From a91ff6653b170c77038c689ab87c6e8eb36f056e Mon Sep 17 00:00:00 2001 From: hugo Date: Tue, 26 May 2026 16:02:28 -0700 Subject: [PATCH 1/4] regen client --- .github/workflows/python.yml | 34 + .openapi-generator/FILES | 14 + .openapi-generator/VERSION | 2 +- README.md | 16 +- client.yaml | 446 +- docs/Cluster.md | 36 + docs/ClusterConnectionType.md | 12 + docs/ClusterCreate.md | 35 + docs/ClusterList.md | 31 + docs/ClusterUpdate.md | 33 + docs/ClustersApi.md | 414 ++ docs/CronSchedule.md | 1 - docs/CronScheduleCreate.md | 1 - docs/CronScheduleUpdate.md | 1 - docs/CurrentUserApi.md | 70 + docs/DeploymentsApi.md | 18 +- docs/ExternalReposApi.md | 4 +- docs/GroupsApi.md | 8 +- docs/ImageTagsApi.md | 8 +- docs/ImagesApi.md | 4 +- docs/InstanceSize.md | 2 + docs/InvitationsApi.md | 4 +- docs/Job.md | 1 + docs/JobCreate.md | 1 + docs/JobUpdate.md | 1 + docs/JobsApi.md | 14 +- docs/LimitsApi.md | 4 +- docs/Org.md | 1 + docs/OrgsApi.md | 12 +- docs/Resource.md | 1 + docs/ResourceState.md | 4 + docs/RouteState.md | 31 + docs/SecretsApi.md | 4 +- docs/ServiceAccountEntitlementsApi.md | 4 +- docs/ServiceAccountsApi.md | 4 +- docs/SharedFoldersApi.md | 4 +- docs/SshPrivateKeysApi.md | 4 +- docs/SshPublicKeysApi.md | 4 +- docs/UsersApi.md | 8 +- docs/WhiteLabelConfiguration.md | 3 + docs/WorkspacesApi.md | 12 +- requirements.txt | 3 +- saturn_api/__init__.py | 466 +- saturn_api/api/__init__.py | 6 +- saturn_api/api/active_api.py | 655 +-- saturn_api/api/api_status_api.py | 101 +- saturn_api/api/api_tokens_api.py | 567 ++- saturn_api/api/authorization_api.py | 441 +- saturn_api/api/clusters_api.py | 1467 +++++++ saturn_api/api/current_user_api.py | 984 +++-- saturn_api/api/dask_clusters_api.py | 2498 +++++++---- saturn_api/api/deployments_api.py | 3607 +++++++++------ .../api/external_repo_attachments_api.py | 550 ++- saturn_api/api/external_repos_api.py | 648 +-- saturn_api/api/groups_api.py | 1024 +++-- saturn_api/api/image_tags_api.py | 1026 +++-- saturn_api/api/images_api.py | 720 +-- saturn_api/api/info_api.py | 184 +- saturn_api/api/invitations_api.py | 562 ++- saturn_api/api/jobs_api.py | 3318 +++++++++----- saturn_api/api/limits_api.py | 556 ++- saturn_api/api/notifications_api.py | 685 +-- saturn_api/api/object_storage_api.py | 1742 ++++---- saturn_api/api/orgs_api.py | 2364 ++++++---- saturn_api/api/recipes_api.py | 678 +-- saturn_api/api/secrets_api.py | 663 +-- .../api/service_account_entitlements_api.py | 504 ++- saturn_api/api/service_accounts_api.py | 529 ++- .../api/shared_folder_attachments_api.py | 550 ++- saturn_api/api/shared_folders_api.py | 669 +-- saturn_api/api/ssh_private_keys_api.py | 612 +-- saturn_api/api/ssh_public_keys_api.py | 594 ++- saturn_api/api/users_api.py | 586 ++- saturn_api/api/workspaces_api.py | 3850 +++++++++++------ saturn_api/api_client.py | 328 +- saturn_api/api_response.py | 11 +- saturn_api/configuration.py | 131 +- saturn_api/exceptions.py | 55 +- saturn_api/models/__init__.py | 107 +- saturn_api/models/active_resource_list.py | 57 +- saturn_api/models/aggregated_usage.py | 32 +- saturn_api/models/api_status.py | 39 +- saturn_api/models/api_token.py | 107 +- saturn_api/models/api_token_create.py | 83 +- saturn_api/models/api_token_info.py | 95 +- saturn_api/models/api_token_list.py | 57 +- saturn_api/models/api_token_update.py | 38 +- saturn_api/models/app_info.py | 140 +- saturn_api/models/auth0_info.py | 43 +- saturn_api/models/authorization_code_grant.py | 47 +- saturn_api/models/authorization_grant.py | 41 +- .../models/authorization_refresh_grant.py | 40 +- .../models/authorization_token_response.py | 75 +- saturn_api/models/build_data.py | 115 +- saturn_api/models/cluster.py | 126 + saturn_api/models/cluster_connection_type.py | 37 + saturn_api/models/cluster_create.py | 120 + saturn_api/models/cluster_list.py | 105 + saturn_api/models/cluster_update.py | 116 + saturn_api/models/concurrency_policy.py | 21 +- saturn_api/models/condition.py | 79 +- .../models/container_runtime_summary.py | 170 +- saturn_api/models/container_status.py | 25 +- saturn_api/models/cron_schedule.py | 60 +- saturn_api/models/cron_schedule_create.py | 48 +- saturn_api/models/cron_schedule_update.py | 50 +- saturn_api/models/daily_usage.py | 53 +- saturn_api/models/daily_usage_list.py | 44 +- saturn_api/models/dask_cluster.py | 220 +- saturn_api/models/dask_cluster_adapt.py | 43 +- saturn_api/models/dask_cluster_attachment.py | 69 +- .../dask_cluster_attachment_scheduler.py | 31 +- .../models/dask_cluster_attachment_worker.py | 52 +- saturn_api/models/dask_cluster_create.py | 102 +- saturn_api/models/dask_cluster_list.py | 57 +- saturn_api/models/dask_cluster_nested.py | 181 +- .../models/dask_cluster_runtime_summary.py | 149 +- saturn_api/models/dask_cluster_scale.py | 38 +- .../models/dask_cluster_server_options.py | 48 +- saturn_api/models/dask_cluster_update.py | 88 +- saturn_api/models/dask_components.py | 21 +- .../dask_worker_runtime_summary_list.py | 57 +- saturn_api/models/dask_worker_summary.py | 52 +- saturn_api/models/data_point.py | 39 +- saturn_api/models/default_images.py | 62 +- saturn_api/models/default_sizes.py | 62 +- saturn_api/models/deployment.py | 269 +- saturn_api/models/deployment_create.py | 209 +- saturn_api/models/deployment_list.py | 57 +- saturn_api/models/deployment_recipe.py | 69 +- saturn_api/models/deployment_route_recipe.py | 54 +- .../models/deployment_runtime_summary.py | 126 +- saturn_api/models/deployment_server_info.py | 60 +- saturn_api/models/deployment_spec.py | 202 +- saturn_api/models/deployment_start.py | 36 +- saturn_api/models/deployment_status.py | 25 +- saturn_api/models/deployment_update.py | 186 +- saturn_api/models/external_repo.py | 93 +- saturn_api/models/external_repo_attachment.py | 122 +- .../models/external_repo_attachment_create.py | 91 +- .../models/external_repo_attachment_list.py | 64 +- .../models/external_repo_attachment_nested.py | 75 +- .../models/external_repo_attachment_recipe.py | 72 +- .../models/external_repo_attachment_update.py | 63 +- saturn_api/models/external_repo_create.py | 52 +- saturn_api/models/external_repo_list.py | 57 +- saturn_api/models/external_repo_update.py | 40 +- saturn_api/models/extra_packages.py | 99 +- saturn_api/models/extra_packages_recipe.py | 84 +- .../models/extra_packages_recipe_apt.py | 31 +- .../models/extra_packages_recipe_conda.py | 39 +- .../models/extra_packages_recipe_pip.py | 34 +- saturn_api/models/group.py | 84 +- saturn_api/models/group_create.py | 70 +- saturn_api/models/group_list.py | 57 +- saturn_api/models/group_member.py | 52 +- saturn_api/models/group_member_create.py | 31 +- saturn_api/models/group_member_list.py | 57 +- saturn_api/models/group_update.py | 56 +- saturn_api/models/hardware_type.py | 21 +- saturn_api/models/historic_log.py | 52 +- saturn_api/models/historic_log_list.py | 57 +- saturn_api/models/identity.py | 57 +- saturn_api/models/identity_by_group_id.py | 31 +- saturn_api/models/identity_by_user_id.py | 31 +- saturn_api/models/identity_reference.py | 43 +- saturn_api/models/identity_type.py | 19 +- saturn_api/models/image.py | 95 +- saturn_api/models/image_access_level.py | 21 +- saturn_api/models/image_build_status.py | 25 +- saturn_api/models/image_create.py | 65 +- saturn_api/models/image_list.py | 57 +- saturn_api/models/image_recipe.py | 67 +- saturn_api/models/image_spec.py | 88 +- saturn_api/models/image_state.py | 55 +- saturn_api/models/image_tag.py | 122 +- saturn_api/models/image_tag_by_id.py | 39 +- saturn_api/models/image_tag_by_name.py | 50 +- saturn_api/models/image_tag_by_uri.py | 48 +- saturn_api/models/image_tag_create.py | 41 +- saturn_api/models/image_tag_create_build.py | 61 +- .../models/image_tag_create_external.py | 45 +- saturn_api/models/image_tag_list.py | 57 +- saturn_api/models/image_tag_recipe.py | 51 +- saturn_api/models/image_tag_reference.py | 43 +- saturn_api/models/image_tag_state.py | 39 +- saturn_api/models/image_tag_update.py | 48 +- saturn_api/models/image_update.py | 56 +- saturn_api/models/instance_size.py | 89 +- saturn_api/models/invitation.py | 85 +- saturn_api/models/invitation_create.py | 47 +- saturn_api/models/invitation_list.py | 57 +- saturn_api/models/invitation_status.py | 21 +- saturn_api/models/invitation_update.py | 34 +- saturn_api/models/job.py | 260 +- saturn_api/models/job_create.py | 202 +- saturn_api/models/job_list.py | 57 +- saturn_api/models/job_recipe.py | 67 +- saturn_api/models/job_restart.py | 36 +- saturn_api/models/job_runtime_summary.py | 133 +- saturn_api/models/job_runtime_summary_list.py | 57 +- saturn_api/models/job_server_info.py | 60 +- saturn_api/models/job_spec.py | 198 +- saturn_api/models/job_start.py | 36 +- saturn_api/models/job_status.py | 27 +- saturn_api/models/job_update.py | 178 +- saturn_api/models/login.py | 34 +- saturn_api/models/metric_series.py | 63 +- saturn_api/models/metrics.py | 144 +- saturn_api/models/notification.py | 76 +- .../models/notification_acknowledged.py | 50 +- saturn_api/models/notification_delete.py | 38 +- saturn_api/models/notification_list.py | 57 +- saturn_api/models/notification_subscribe.py | 43 +- .../models/notification_subscription.py | 56 +- .../models/notification_subscription_list.py | 57 +- saturn_api/models/notification_unsubscribe.py | 32 +- .../object_storage_bulk_delete_results.py | 40 +- .../models/object_storage_bulk_download.py | 51 +- .../models/object_storage_bulk_reference.py | 49 +- .../models/object_storage_complete_part.py | 32 +- .../models/object_storage_completed_upload.py | 44 +- .../models/object_storage_copy_source.py | 41 +- .../models/object_storage_dir_details.py | 36 +- .../models/object_storage_file_details.py | 54 +- saturn_api/models/object_storage_list.py | 65 +- .../object_storage_presigned_download.py | 54 +- .../models/object_storage_presigned_part.py | 52 +- .../models/object_storage_presigned_upload.py | 57 +- saturn_api/models/object_storage_reference.py | 44 +- .../models/object_storage_shared_owner.py | 44 +- .../object_storage_shared_owner_list.py | 59 +- saturn_api/models/object_storage_upload.py | 88 +- .../models/object_storage_upload_create.py | 73 +- .../models/object_storage_upload_list.py | 49 +- .../models/object_storage_usage_stats.py | 86 +- saturn_api/models/org.py | 116 +- saturn_api/models/org_create.py | 66 +- saturn_api/models/org_invitation.py | 102 +- saturn_api/models/org_invitation_create.py | 47 +- saturn_api/models/org_invitation_list.py | 57 +- saturn_api/models/org_invitation_update.py | 34 +- saturn_api/models/org_list.py | 57 +- saturn_api/models/org_member_create.py | 49 +- saturn_api/models/org_member_update.py | 44 +- saturn_api/models/org_update.py | 64 +- .../models/orgs_list_owners200_response.py | 34 +- saturn_api/models/owner.py | 103 +- saturn_api/models/owner_by_id.py | 31 +- saturn_api/models/owner_by_identity_id.py | 45 +- saturn_api/models/owner_by_name.py | 31 +- saturn_api/models/owner_detailed.py | 156 +- saturn_api/models/owner_detailed_list.py | 57 +- saturn_api/models/owner_list.py | 57 +- saturn_api/models/owner_reference.py | 44 +- saturn_api/models/owner_usage.py | 46 +- saturn_api/models/owner_usage_list.py | 48 +- saturn_api/models/owner_user_detailed.py | 136 +- saturn_api/models/pod_history.py | 72 +- saturn_api/models/pod_logs.py | 36 +- saturn_api/models/pod_runtime_summary.py | 168 +- saturn_api/models/pod_runtime_summary_list.py | 57 +- saturn_api/models/pod_status.py | 29 +- saturn_api/models/recipe.py | 43 +- saturn_api/models/recipe_list.py | 57 +- saturn_api/models/resource.py | 43 +- .../models/resource_by_deployment_id.py | 31 +- saturn_api/models/resource_by_job_id.py | 31 +- saturn_api/models/resource_by_workspace_id.py | 31 +- saturn_api/models/resource_clusters.py | 40 +- saturn_api/models/resource_history.py | 49 +- saturn_api/models/resource_recipe.py | 42 +- saturn_api/models/resource_reference.py | 48 +- saturn_api/models/resource_state.py | 87 +- saturn_api/models/resource_template.py | 112 +- .../models/resource_template_access_level.py | 21 +- saturn_api/models/resource_token_info.py | 34 +- saturn_api/models/resource_token_update.py | 33 +- saturn_api/models/resource_type.py | 23 +- saturn_api/models/restart_policy.py | 21 +- saturn_api/models/route.py | 96 +- saturn_api/models/route_by_container_port.py | 34 +- saturn_api/models/route_by_id.py | 31 +- saturn_api/models/route_by_subdomain.py | 31 +- saturn_api/models/route_create.py | 56 +- saturn_api/models/route_list.py | 57 +- saturn_api/models/route_reference.py | 43 +- saturn_api/models/route_state.py | 97 + saturn_api/models/route_update.py | 56 +- saturn_api/models/secret.py | 67 +- saturn_api/models/secret_access_level.py | 19 +- saturn_api/models/secret_attachment.py | 80 +- saturn_api/models/secret_attachment_create.py | 80 +- saturn_api/models/secret_attachment_list.py | 57 +- saturn_api/models/secret_attachment_recipe.py | 61 +- saturn_api/models/secret_attachment_type.py | 19 +- saturn_api/models/secret_attachment_update.py | 80 +- saturn_api/models/secret_create.py | 48 +- saturn_api/models/secret_list.py | 57 +- saturn_api/models/secret_update.py | 38 +- saturn_api/models/server_options.py | 70 +- saturn_api/models/server_options_size.py | 49 +- saturn_api/models/service_account.py | 66 +- .../models/service_account_attachment.py | 53 +- saturn_api/models/service_account_create.py | 59 +- .../service_account_create_attachment.py | 35 +- .../models/service_account_entitlement.py | 77 +- .../service_account_entitlement_create.py | 54 +- .../service_account_entitlement_list.py | 64 +- saturn_api/models/service_account_list.py | 57 +- saturn_api/models/service_account_update.py | 45 +- saturn_api/models/shared_access_mode.py | 19 +- saturn_api/models/shared_folder.py | 84 +- .../models/shared_folder_access_level.py | 19 +- saturn_api/models/shared_folder_attachment.py | 77 +- .../models/shared_folder_attachment_create.py | 52 +- .../models/shared_folder_attachment_list.py | 64 +- .../models/shared_folder_attachment_recipe.py | 46 +- .../models/shared_folder_attachment_update.py | 35 +- saturn_api/models/shared_folder_create.py | 56 +- saturn_api/models/shared_folder_list.py | 57 +- saturn_api/models/shared_folder_update.py | 35 +- saturn_api/models/ssh_private_key.py | 91 +- saturn_api/models/ssh_private_key_create.py | 65 +- saturn_api/models/ssh_private_key_list.py | 57 +- saturn_api/models/ssh_private_key_partial.py | 80 +- saturn_api/models/ssh_private_key_update.py | 52 +- saturn_api/models/ssh_public_key.py | 59 +- saturn_api/models/ssh_public_key_create.py | 52 +- saturn_api/models/ssh_public_key_list.py | 57 +- saturn_api/models/ssh_public_key_update.py | 32 +- saturn_api/models/stats.py | 52 +- saturn_api/models/usage_limits.py | 179 +- saturn_api/models/usage_limits_create.py | 155 +- saturn_api/models/usage_limits_list.py | 57 +- saturn_api/models/usage_limits_update.py | 148 +- saturn_api/models/usage_owner.py | 54 +- saturn_api/models/user.py | 48 +- saturn_api/models/user_admin_create.py | 84 +- saturn_api/models/user_detailed.py | 94 +- saturn_api/models/user_detailed_list.py | 57 +- saturn_api/models/user_list.py | 53 +- saturn_api/models/user_owner_list.py | 57 +- saturn_api/models/user_preferences.py | 53 +- saturn_api/models/user_preferences_update.py | 31 +- saturn_api/models/user_update.py | 75 +- saturn_api/models/users_get200_response.py | 34 +- saturn_api/models/users_list200_response.py | 34 +- saturn_api/models/viewer.py | 71 +- saturn_api/models/viewer_create.py | 53 +- saturn_api/models/viewer_list.py | 57 +- saturn_api/models/viewer_recipe.py | 44 +- .../models/white_label_configuration.py | 92 +- saturn_api/models/workload_type.py | 25 +- saturn_api/models/workspace.py | 282 +- saturn_api/models/workspace_create.py | 236 +- .../models/workspace_ide_default_images.py | 59 +- saturn_api/models/workspace_list.py | 57 +- saturn_api/models/workspace_recipe.py | 69 +- saturn_api/models/workspace_route_recipe.py | 50 +- .../models/workspace_runtime_summary.py | 131 +- saturn_api/models/workspace_server_info.py | 73 +- saturn_api/models/workspace_server_options.py | 67 +- saturn_api/models/workspace_spec.py | 230 +- saturn_api/models/workspace_start.py | 36 +- saturn_api/models/workspace_update.py | 198 +- saturn_api/rest.py | 79 +- setup.py | 24 +- 368 files changed, 31592 insertions(+), 23261 deletions(-) create mode 100644 .github/workflows/python.yml create mode 100644 docs/Cluster.md create mode 100644 docs/ClusterConnectionType.md create mode 100644 docs/ClusterCreate.md create mode 100644 docs/ClusterList.md create mode 100644 docs/ClusterUpdate.md create mode 100644 docs/ClustersApi.md create mode 100644 docs/RouteState.md create mode 100644 saturn_api/api/clusters_api.py create mode 100644 saturn_api/models/cluster.py create mode 100644 saturn_api/models/cluster_connection_type.py create mode 100644 saturn_api/models/cluster_create.py create mode 100644 saturn_api/models/cluster_list.py create mode 100644 saturn_api/models/cluster_update.py create mode 100644 saturn_api/models/route_state.py diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..6db7930 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: saturn_api Python package + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test with pytest + run: | + pytest --cov=saturn_api diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 76e9890..0b9c233 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -19,6 +19,12 @@ docs/AuthorizationGrant.md docs/AuthorizationRefreshGrant.md docs/AuthorizationTokenResponse.md docs/BuildData.md +docs/Cluster.md +docs/ClusterConnectionType.md +docs/ClusterCreate.md +docs/ClusterList.md +docs/ClusterUpdate.md +docs/ClustersApi.md docs/ConcurrencyPolicy.md docs/Condition.md docs/ContainerRuntimeSummary.md @@ -223,6 +229,7 @@ docs/RouteBySubdomain.md docs/RouteCreate.md docs/RouteList.md docs/RouteReference.md +docs/RouteState.md docs/RouteUpdate.md docs/SSHPrivateKey.md docs/SSHPrivateKeyCreate.md @@ -317,6 +324,7 @@ saturn_api/api/active_api.py saturn_api/api/api_status_api.py saturn_api/api/api_tokens_api.py saturn_api/api/authorization_api.py +saturn_api/api/clusters_api.py saturn_api/api/current_user_api.py saturn_api/api/dask_clusters_api.py saturn_api/api/deployments_api.py @@ -362,6 +370,11 @@ saturn_api/models/authorization_grant.py saturn_api/models/authorization_refresh_grant.py saturn_api/models/authorization_token_response.py saturn_api/models/build_data.py +saturn_api/models/cluster.py +saturn_api/models/cluster_connection_type.py +saturn_api/models/cluster_create.py +saturn_api/models/cluster_list.py +saturn_api/models/cluster_update.py saturn_api/models/concurrency_policy.py saturn_api/models/condition.py saturn_api/models/container_runtime_summary.py @@ -550,6 +563,7 @@ saturn_api/models/route_by_subdomain.py saturn_api/models/route_create.py saturn_api/models/route_list.py saturn_api/models/route_reference.py +saturn_api/models/route_state.py saturn_api/models/route_update.py saturn_api/models/secret.py saturn_api/models/secret_access_level.py diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 6328c54..696eaac 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.17.0 +7.22.0 diff --git a/README.md b/README.md index 7db6ead..0460084 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: 2026.02.01 - Package version: 1.0.0 -- Generator version: 7.17.0 +- Generator version: 7.22.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 3.9+ +Python 3.10+ ## Installation & Usage ### pip install @@ -109,6 +109,12 @@ Class | Method | HTTP request | Description *AuthorizationApi* | [**get_oauth_init**](docs/AuthorizationApi.md#get_oauth_init) | **GET** /api/auth/token | Initialize oauth *AuthorizationApi* | [**login**](docs/AuthorizationApi.md#login) | **POST** /api/auth/login | Login *AuthorizationApi* | [**logout**](docs/AuthorizationApi.md#logout) | **GET** /api/auth/logout | Logout +*ClustersApi* | [**create**](docs/ClustersApi.md#create) | **POST** /api/clusters | Create cluster +*ClustersApi* | [**delete**](docs/ClustersApi.md#delete) | **DELETE** /api/clusters/{cluster_id} | Delete cluster +*ClustersApi* | [**get**](docs/ClustersApi.md#get) | **GET** /api/clusters/{cluster_id} | Get cluster +*ClustersApi* | [**list**](docs/ClustersApi.md#list) | **GET** /api/clusters | List clusters +*ClustersApi* | [**update**](docs/ClustersApi.md#update) | **PATCH** /api/clusters/{cluster_id} | Update cluster +*CurrentUserApi* | [**delete**](docs/CurrentUserApi.md#delete) | **DELETE** /api/user | Delete current user *CurrentUserApi* | [**get**](docs/CurrentUserApi.md#get) | **GET** /api/user | Get current user *CurrentUserApi* | [**get_aggregated_usage**](docs/CurrentUserApi.md#get_aggregated_usage) | **GET** /api/user/usage/aggregated | Get aggregated usage *CurrentUserApi* | [**get_preferences**](docs/CurrentUserApi.md#get_preferences) | **GET** /api/user/preferences | Get current user preferences @@ -390,6 +396,11 @@ Class | Method | HTTP request | Description - [AuthorizationRefreshGrant](docs/AuthorizationRefreshGrant.md) - [AuthorizationTokenResponse](docs/AuthorizationTokenResponse.md) - [BuildData](docs/BuildData.md) + - [Cluster](docs/Cluster.md) + - [ClusterConnectionType](docs/ClusterConnectionType.md) + - [ClusterCreate](docs/ClusterCreate.md) + - [ClusterList](docs/ClusterList.md) + - [ClusterUpdate](docs/ClusterUpdate.md) - [ConcurrencyPolicy](docs/ConcurrencyPolicy.md) - [Condition](docs/Condition.md) - [ContainerRuntimeSummary](docs/ContainerRuntimeSummary.md) @@ -578,6 +589,7 @@ Class | Method | HTTP request | Description - [RouteCreate](docs/RouteCreate.md) - [RouteList](docs/RouteList.md) - [RouteReference](docs/RouteReference.md) + - [RouteState](docs/RouteState.md) - [RouteUpdate](docs/RouteUpdate.md) - [SSHPrivateKey](docs/SSHPrivateKey.md) - [SSHPrivateKeyCreate](docs/SSHPrivateKeyCreate.md) diff --git a/client.yaml b/client.yaml index 3f4ca82..2d58b9f 100644 --- a/client.yaml +++ b/client.yaml @@ -308,6 +308,140 @@ paths: schema: $ref: '#/components/schemas/AuthorizationTokenResponse' description: Created + /api/clusters: + get: + summary: List clusters + description: Paginated list of clusters. + operationId: clusters_list + tags: + - clusters + parameters: + - in: query + name: org_id + description: Filter clusters by org ID. + schema: + type: string + required: false + - in: query + name: name + description: Substring search on cluster name. + schema: + type: string + required: false + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Page size. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + - in: query + name: descending + description: List results in descending order. + schema: + type: boolean + default: false + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ClusterList' + description: Ok + post: + summary: Create cluster + description: Create a new cluster. + operationId: clusters_create + tags: + - clusters + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClusterCreate' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + description: Created + /api/clusters/{cluster_id}: + delete: + summary: Delete cluster + description: Delete a cluster. + operationId: clusters_delete + tags: + - clusters + parameters: + - name: cluster_id + in: path + schema: + type: string + required: true + responses: + '204': + description: Deleted + get: + summary: Get cluster + description: Get a cluster. + operationId: clusters_get + tags: + - clusters + parameters: + - name: cluster_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + description: Ok + patch: + summary: Update cluster + description: Update a cluster. + operationId: clusters_update + tags: + - clusters + parameters: + - name: cluster_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClusterUpdate' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + description: Updated /api/dask_clusters: get: summary: List dask clusters @@ -1014,7 +1148,14 @@ paths: required: false - in: query name: name - description: Prefix matched search string on deployment name. + description: Substring matched search string on deployment name. + schema: + type: string + required: false + - in: query + name: tags + description: Filter to deployments whose tags contain the given 'key:value' + pair, e.g. 'saturn.io/kind:finetune'. schema: type: string required: false @@ -1357,7 +1498,7 @@ paths: required: true - in: query name: subdomain - description: Prefix matched search string on route subdomain. + description: Substring matched search string on route subdomain. schema: type: string required: false @@ -1530,7 +1671,7 @@ paths: required: true - in: query name: location - description: Prefix matched search string on secret attachment location. + description: Substring matched search string on secret attachment location. schema: type: string required: false @@ -2135,7 +2276,7 @@ paths: required: false - in: query name: remote_url - description: Prefix matched search string on repository remote URL. + description: Substring matched search string on repository remote URL. schema: type: string required: false @@ -2263,7 +2404,7 @@ paths: parameters: - in: query name: name - description: Prefix matched search string on group name. + description: Substring matched search string on group name. schema: type: string required: false @@ -2430,7 +2571,7 @@ paths: required: true - in: query name: name - description: Prefix matched search string on group member username. + description: Substring matched search string on group member username. schema: type: string required: false @@ -2578,7 +2719,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on image name. + description: Substring matched search string on image name. schema: type: string required: false @@ -2736,13 +2877,13 @@ paths: required: true - in: query name: version - description: Prefix matched search string on image tag version. + description: Substring matched search string on image tag version. schema: type: string required: false - in: query name: image_uri - description: Prefix matched search string on image tag URI. + description: Substring matched search string on image tag URI. schema: type: string required: false @@ -3074,7 +3215,7 @@ paths: required: false - in: query name: email - description: Prefix matched search string on email. + description: Substring matched search string on email. schema: type: string required: false @@ -3251,7 +3392,14 @@ paths: required: false - in: query name: name - description: Prefix matched search string on job name. + description: Substring matched search string on job name. + schema: + type: string + required: false + - in: query + name: tags + description: Filter to jobs whose tags contain the given 'key:value' pair, + e.g. 'saturn.io/kind:finetune'. schema: type: string required: false @@ -3659,7 +3807,7 @@ paths: required: true - in: query name: location - description: Prefix matched search string on secret attachment location. + description: Substring matched search string on secret attachment location. schema: type: string required: false @@ -4087,7 +4235,7 @@ paths: parameters: - in: query name: name - description: Prefix matched search string on usage limit name. + description: Substring matched search string on usage limit name. schema: type: string required: false @@ -4842,7 +4990,7 @@ paths: parameters: - in: query name: name - description: Prefix matched search string on org name. + description: Substring matched search string on org name. schema: type: string required: false @@ -4987,7 +5135,7 @@ paths: required: false - in: query name: email - description: Prefix matched search string on email. + description: Substring matched search string on email. schema: type: string required: false @@ -5297,7 +5445,7 @@ paths: required: true - in: query name: name - description: Prefix matched search string by owner identity name. + description: Substring matched search string by owner identity name. schema: type: string required: false @@ -5765,7 +5913,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on secret name. + description: Substring matched search string on secret name. schema: type: string required: false @@ -5918,7 +6066,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on entitled service account name. + description: Substring matched search string on entitled service account name. schema: type: string required: false @@ -6021,7 +6169,7 @@ paths: parameters: - in: query name: name - description: Prefix matched search string on service account name. + description: Substring matched search string on service account name. schema: type: string required: false @@ -6332,7 +6480,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on shared folder name. + description: Substring matched search string on shared folder name. schema: type: string required: false @@ -6485,7 +6633,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on SSH private key name. + description: Substring matched search string on SSH private key name. schema: type: string required: false @@ -6638,7 +6786,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on SSH public key name. + description: Substring matched search string on SSH public key name. schema: type: string required: false @@ -6911,6 +7059,14 @@ paths: $ref: '#/components/schemas/ApiTokenInfo' description: Updated /api/user: + delete: + summary: Delete current user + operationId: currentuser_delete + tags: + - current_user + responses: + '204': + description: Deleted get: summary: Get current user operationId: currentuser_get @@ -7053,13 +7209,13 @@ paths: parameters: - in: query name: username - description: Prefix matched search string on user name. + description: Substring matched search string on user name. schema: type: string required: false - in: query name: email - description: Prefix matched search string on user email. + description: Substring matched search string on user email. schema: type: string required: false @@ -7295,7 +7451,7 @@ paths: required: false - in: query name: name - description: Prefix matched search string on workspace name. + description: Substring matched search string on workspace name. schema: type: string required: false @@ -7638,7 +7794,7 @@ paths: required: true - in: query name: subdomain - description: Prefix matched search string on route subdomain. + description: Substring matched search string on route subdomain. schema: type: string required: false @@ -7811,7 +7967,7 @@ paths: required: true - in: query name: location - description: Prefix matched search string on secret attachment location. + description: Substring matched search string on secret attachment location. schema: type: string required: false @@ -8676,6 +8832,22 @@ components: - image - instance_type - name + RouteState: + type: object + properties: + subdomain: + type: string + readOnly: true + container_port: + type: integer + readOnly: true + url: + type: string + readOnly: true + required: + - container_port + - subdomain + - url ResourceState: type: object properties: @@ -8688,6 +8860,27 @@ components: status: type: string readOnly: true + url: + type: string + readOnly: true + description: External URL for the primary route, if applicable. + nullable: true + ssh_url: + type: string + readOnly: true + description: External SSH URL for the resource when SSH is enabled. + nullable: true + ssh_user: + type: string + readOnly: true + description: SSH username for the resource when SSH is enabled. + nullable: true + routes: + type: array + readOnly: true + description: External URL for each route exposed by the resource. + items: + $ref: '#/components/schemas/RouteState' required: - id - status @@ -9787,13 +9980,7 @@ components: readOnly: true description: Specifies how to treat concurrent executions of a job's cron schedule. - backoff_limit: - type: integer - readOnly: true - minimum: 0 - description: Maximum number of retries for a failed job. required: - - backoff_limit - concurrency_policy - schedule Job: @@ -9873,6 +10060,10 @@ components: type: integer readOnly: true description: Number of pod replicas. + retries: + type: integer + readOnly: true + description: Maximum number of retries for a failed job. k8s_name: type: string readOnly: true @@ -9945,6 +10136,7 @@ components: - owner - require_restart - resource_type + - retries - running_count - scale - scheduled @@ -10554,6 +10746,145 @@ components: - refresh_expires_in - refresh_token - token_type + ClusterConnectionType: + type: string + enum: + - incluster + - token + Cluster: + type: object + properties: + id: + type: string + readOnly: true + description: Cluster ID. + name: + type: string + readOnly: true + description: Cluster name. + org_id: + type: string + readOnly: true + description: Owning org ID. + connection_type: + readOnly: true + description: Connection method. + $ref: '#/components/schemas/ClusterConnectionType' + server_url: + type: string + readOnly: true + description: K8s API server URL. + nullable: true + utilities: + type: object + readOnly: true + description: ClusterUtilities metadata. + nullable: true + additionalProperties: {} + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + description: Creation timestamp. + updated_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + description: Last update timestamp. + required: + - connection_type + - created_at + - id + - name + - org_id + - updated_at + ClusterList: + type: object + properties: + clusters: + type: array + readOnly: true + description: List of clusters. + items: + $ref: '#/components/schemas/Cluster' + prev_key: + type: string + readOnly: true + description: Previous page key. + next_key: + type: string + readOnly: true + description: Next page key. + required: + - clusters + ClusterCreate: + type: object + properties: + name: + type: string + description: Unique name of the cluster. + org_id: + type: string + description: ID of the org that owns the cluster. + connection_type: + description: 'How Atlas should connect to the cluster: ''incluster'' uses + the pod''s service account; ''token'' uses stored server_url + ca_bundle + + token.' + $ref: '#/components/schemas/ClusterConnectionType' + server_url: + type: string + default: null + description: K8s API server URL. Required when connection_type is 'token'. + nullable: true + ca_bundle: + type: string + default: null + description: Base64-encoded CA bundle. Required when connection_type is + 'token'. + nullable: true + token: + type: string + default: null + description: Bearer token for k8s API. Required when connection_type is + 'token'. + nullable: true + utilities: + type: object + default: null + description: ClusterUtilities metadata (service endpoints). + nullable: true + additionalProperties: {} + required: + - connection_type + - name + - org_id + ClusterUpdate: + type: object + properties: + connection_type: + description: Connection type. + $ref: '#/components/schemas/ClusterConnectionType' + server_url: + type: string + default: null + description: K8s API server URL. + nullable: true + ca_bundle: + type: string + default: null + description: Base64-encoded CA bundle. + nullable: true + token: + type: string + default: null + description: Bearer token. + nullable: true + utilities: + type: object + default: null + description: ClusterUtilities metadata. + nullable: true + additionalProperties: {} DaskClusterList: type: object properties: @@ -11160,6 +11491,12 @@ components: description: type: string default: '' + disabled: + type: boolean + default: false + disabled_message: + type: string + default: '' required: - cloud - cores @@ -12748,6 +13085,10 @@ components: default: null description: Short version of the brand name. nullable: true + logo_mode: + type: string + default: icon_and_text + description: 'Logo display mode: ''icon_and_text'' or ''logo_only''.' logo_icon_url: type: string description: Brand icon URL. @@ -12762,6 +13103,21 @@ components: primary_color: type: string description: Primary frontend color. + cloud_display_names: + type: object + default: null + description: 'Map of cloud provider IDs to display names (e.g. {''nebius'': + ''My Cloud''}).' + additionalProperties: + type: string + nullable: true + cloud_icon_urls: + type: object + default: null + description: Map of cloud provider IDs to icon URLs. + additionalProperties: + type: string + nullable: true support_email: type: string description: Support contact email. @@ -13018,11 +13374,6 @@ components: description: Specifies how to treat concurrent executions of a job's cron schedule. $ref: '#/components/schemas/ConcurrencyPolicy' - backoff_limit: - type: integer - default: 0 - minimum: 0 - description: Maximum number of retries for a failed job. required: - schedule JobCreate: @@ -13106,6 +13457,11 @@ components: default: 1 minimum: 1 description: Number of pod replicas. + retries: + type: integer + default: 0 + minimum: 0 + description: Maximum number of retries for a failed job. cron_schedule_options: default: null description: Cron schedule configuration for scheduled jobs. @@ -13125,10 +13481,6 @@ components: description: Specifies how to treat concurrent executions of a job's cron schedule. $ref: '#/components/schemas/ConcurrencyPolicy' - backoff_limit: - type: integer - minimum: 0 - description: Maximum number of retries for a failed job. JobUpdate: type: object properties: @@ -13197,6 +13549,10 @@ components: type: integer minimum: 1 description: Number of pod replicas. + retries: + type: integer + minimum: 0 + description: Maximum number of retries for a failed job. cron_schedule_options: default: null description: Cron schedule configuration for scheduled jobs. @@ -14103,6 +14459,12 @@ components: readOnly: true description: Usage limits ID applied to the entire org. nullable: true + limits: + readOnly: true + description: Usage limits applied to the entire org, if set. + allOf: + - $ref: '#/components/schemas/UsageLimits' + nullable: true is_primary: type: boolean readOnly: true diff --git a/docs/Cluster.md b/docs/Cluster.md new file mode 100644 index 0000000..850e8cc --- /dev/null +++ b/docs/Cluster.md @@ -0,0 +1,36 @@ +# Cluster + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Cluster ID. | [readonly] +**name** | **str** | Cluster name. | [readonly] +**org_id** | **str** | Owning org ID. | [readonly] +**connection_type** | [**ClusterConnectionType**](ClusterConnectionType.md) | | +**server_url** | **str** | K8s API server URL. | [optional] [readonly] +**utilities** | **Dict[str, object]** | ClusterUtilities metadata. | [optional] [readonly] +**created_at** | **str** | Creation timestamp. | [readonly] +**updated_at** | **str** | Last update timestamp. | [readonly] + +## Example + +```python +from saturn_api.models.cluster import Cluster + +# TODO update the JSON string below +json = "{}" +# create an instance of Cluster from a JSON string +cluster_instance = Cluster.from_json(json) +# print the JSON string representation of the object +print(Cluster.to_json()) + +# convert the object into a dict +cluster_dict = cluster_instance.to_dict() +# create an instance of Cluster from a dict +cluster_from_dict = Cluster.from_dict(cluster_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConnectionType.md b/docs/ClusterConnectionType.md new file mode 100644 index 0000000..d84ea9d --- /dev/null +++ b/docs/ClusterConnectionType.md @@ -0,0 +1,12 @@ +# ClusterConnectionType + + +## Enum + +* `INCLUSTER` (value: `'incluster'`) + +* `TOKEN` (value: `'token'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterCreate.md b/docs/ClusterCreate.md new file mode 100644 index 0000000..05daa61 --- /dev/null +++ b/docs/ClusterCreate.md @@ -0,0 +1,35 @@ +# ClusterCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Unique name of the cluster. | +**org_id** | **str** | ID of the org that owns the cluster. | +**connection_type** | [**ClusterConnectionType**](ClusterConnectionType.md) | | +**server_url** | **str** | K8s API server URL. Required when connection_type is 'token'. | [optional] +**ca_bundle** | **str** | Base64-encoded CA bundle. Required when connection_type is 'token'. | [optional] +**token** | **str** | Bearer token for k8s API. Required when connection_type is 'token'. | [optional] +**utilities** | **Dict[str, object]** | ClusterUtilities metadata (service endpoints). | [optional] + +## Example + +```python +from saturn_api.models.cluster_create import ClusterCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterCreate from a JSON string +cluster_create_instance = ClusterCreate.from_json(json) +# print the JSON string representation of the object +print(ClusterCreate.to_json()) + +# convert the object into a dict +cluster_create_dict = cluster_create_instance.to_dict() +# create an instance of ClusterCreate from a dict +cluster_create_from_dict = ClusterCreate.from_dict(cluster_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterList.md b/docs/ClusterList.md new file mode 100644 index 0000000..cdc33aa --- /dev/null +++ b/docs/ClusterList.md @@ -0,0 +1,31 @@ +# ClusterList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clusters** | [**List[Cluster]**](Cluster.md) | List of clusters. | [readonly] +**prev_key** | **str** | Previous page key. | [optional] [readonly] +**next_key** | **str** | Next page key. | [optional] [readonly] + +## Example + +```python +from saturn_api.models.cluster_list import ClusterList + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterList from a JSON string +cluster_list_instance = ClusterList.from_json(json) +# print the JSON string representation of the object +print(ClusterList.to_json()) + +# convert the object into a dict +cluster_list_dict = cluster_list_instance.to_dict() +# create an instance of ClusterList from a dict +cluster_list_from_dict = ClusterList.from_dict(cluster_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterUpdate.md b/docs/ClusterUpdate.md new file mode 100644 index 0000000..5e0bc2e --- /dev/null +++ b/docs/ClusterUpdate.md @@ -0,0 +1,33 @@ +# ClusterUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connection_type** | [**ClusterConnectionType**](ClusterConnectionType.md) | | [optional] +**server_url** | **str** | K8s API server URL. | [optional] +**ca_bundle** | **str** | Base64-encoded CA bundle. | [optional] +**token** | **str** | Bearer token. | [optional] +**utilities** | **Dict[str, object]** | ClusterUtilities metadata. | [optional] + +## Example + +```python +from saturn_api.models.cluster_update import ClusterUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterUpdate from a JSON string +cluster_update_instance = ClusterUpdate.from_json(json) +# print the JSON string representation of the object +print(ClusterUpdate.to_json()) + +# convert the object into a dict +cluster_update_dict = cluster_update_instance.to_dict() +# create an instance of ClusterUpdate from a dict +cluster_update_from_dict = ClusterUpdate.from_dict(cluster_update_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClustersApi.md b/docs/ClustersApi.md new file mode 100644 index 0000000..3c8f113 --- /dev/null +++ b/docs/ClustersApi.md @@ -0,0 +1,414 @@ +# saturn_api.ClustersApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](ClustersApi.md#create) | **POST** /api/clusters | Create cluster +[**delete**](ClustersApi.md#delete) | **DELETE** /api/clusters/{cluster_id} | Delete cluster +[**get**](ClustersApi.md#get) | **GET** /api/clusters/{cluster_id} | Get cluster +[**list**](ClustersApi.md#list) | **GET** /api/clusters | List clusters +[**update**](ClustersApi.md#update) | **PATCH** /api/clusters/{cluster_id} | Update cluster + + +# **create** +> Cluster create(cluster_create) + +Create cluster + +Create a new cluster. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.cluster import Cluster +from saturn_api.models.cluster_create import ClusterCreate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ClustersApi(api_client) + cluster_create = saturn_api.ClusterCreate() # ClusterCreate | + + try: + # Create cluster + api_response = await api_instance.create(cluster_create) + print("The response of ClustersApi->create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClustersApi->create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_create** | [**ClusterCreate**](ClusterCreate.md)| | + +### Return type + +[**Cluster**](Cluster.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> delete(cluster_id) + +Delete cluster + +Delete a cluster. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ClustersApi(api_client) + cluster_id = 'cluster_id_example' # str | + + try: + # Delete cluster + await api_instance.delete(cluster_id) + except Exception as e: + print("Exception when calling ClustersApi->delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Cluster get(cluster_id) + +Get cluster + +Get a cluster. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.cluster import Cluster +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ClustersApi(api_client) + cluster_id = 'cluster_id_example' # str | + + try: + # Get cluster + api_response = await api_instance.get(cluster_id) + print("The response of ClustersApi->get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClustersApi->get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **str**| | + +### Return type + +[**Cluster**](Cluster.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> ClusterList list(org_id=org_id, name=name, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + +List clusters + +Paginated list of clusters. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.cluster_list import ClusterList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ClustersApi(api_client) + org_id = 'org_id_example' # str | Filter clusters by org ID. (optional) + name = 'name_example' # str | Substring search on cluster name. (optional) + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Page size. (optional) (default to 100) + descending = False # bool | List results in descending order. (optional) (default to False) + + try: + # List clusters + api_response = await api_instance.list(org_id=org_id, name=name, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + print("The response of ClustersApi->list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClustersApi->list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| Filter clusters by org ID. | [optional] + **name** | **str**| Substring search on cluster name. | [optional] + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Page size. | [optional] [default to 100] + **descending** | **bool**| List results in descending order. | [optional] [default to False] + +### Return type + +[**ClusterList**](ClusterList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> Cluster update(cluster_id, cluster_update) + +Update cluster + +Update a cluster. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.cluster import Cluster +from saturn_api.models.cluster_update import ClusterUpdate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ClustersApi(api_client) + cluster_id = 'cluster_id_example' # str | + cluster_update = saturn_api.ClusterUpdate() # ClusterUpdate | + + try: + # Update cluster + api_response = await api_instance.update(cluster_id, cluster_update) + print("The response of ClustersApi->update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClustersApi->update: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **str**| | + **cluster_update** | [**ClusterUpdate**](ClusterUpdate.md)| | + +### Return type + +[**Cluster**](Cluster.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CronSchedule.md b/docs/CronSchedule.md index 6bf4f0d..a5120d0 100644 --- a/docs/CronSchedule.md +++ b/docs/CronSchedule.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **schedule** | **str** | Cron schedule for triggering the job. | [readonly] **concurrency_policy** | **str** | Specifies how to treat concurrent executions of a job's cron schedule. | [readonly] -**backoff_limit** | **int** | Maximum number of retries for a failed job. | [readonly] ## Example diff --git a/docs/CronScheduleCreate.md b/docs/CronScheduleCreate.md index dbec5de..9cbbf6e 100644 --- a/docs/CronScheduleCreate.md +++ b/docs/CronScheduleCreate.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **schedule** | **str** | Cron schedule for triggering the job. | **concurrency_policy** | [**ConcurrencyPolicy**](ConcurrencyPolicy.md) | | [optional] -**backoff_limit** | **int** | Maximum number of retries for a failed job. | [optional] [default to 0] ## Example diff --git a/docs/CronScheduleUpdate.md b/docs/CronScheduleUpdate.md index 38790ae..c0be573 100644 --- a/docs/CronScheduleUpdate.md +++ b/docs/CronScheduleUpdate.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **schedule** | **str** | Cron schedule for triggering the job. | [optional] **concurrency_policy** | [**ConcurrencyPolicy**](ConcurrencyPolicy.md) | | [optional] -**backoff_limit** | **int** | Maximum number of retries for a failed job. | [optional] ## Example diff --git a/docs/CurrentUserApi.md b/docs/CurrentUserApi.md index aa33d07..7eec75a 100644 --- a/docs/CurrentUserApi.md +++ b/docs/CurrentUserApi.md @@ -4,6 +4,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**delete**](CurrentUserApi.md#delete) | **DELETE** /api/user | Delete current user [**get**](CurrentUserApi.md#get) | **GET** /api/user | Get current user [**get_aggregated_usage**](CurrentUserApi.md#get_aggregated_usage) | **GET** /api/user/usage/aggregated | Get aggregated usage [**get_preferences**](CurrentUserApi.md#get_preferences) | **GET** /api/user/preferences | Get current user preferences @@ -13,6 +14,75 @@ Method | HTTP request | Description [**update_preferences**](CurrentUserApi.md#update_preferences) | **PATCH** /api/user/preferences | Update current user preferences +# **delete** +> delete() + +Delete current user + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.CurrentUserApi(api_client) + + try: + # Delete current user + await api_instance.delete() + except Exception as e: + print("Exception when calling CurrentUserApi->delete: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get** > UserDetailed get() diff --git a/docs/DeploymentsApi.md b/docs/DeploymentsApi.md index 2152c65..c15bddf 100644 --- a/docs/DeploymentsApi.md +++ b/docs/DeploymentsApi.md @@ -1845,7 +1845,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list** -> DeploymentList list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) +> DeploymentList list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) List deployments @@ -1887,7 +1887,8 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - name = 'name_example' # str | Prefix matched search string on deployment name. (optional) + name = 'name_example' # str | Substring matched search string on deployment name. (optional) + tags = 'tags_example' # str | Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -1895,7 +1896,7 @@ async with saturn_api.ApiClient(configuration) as api_client: try: # List deployments - api_response = await api_instance.list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + api_response = await api_instance.list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) print("The response of DeploymentsApi->list:\n") pprint(api_response) except Exception as e: @@ -1915,7 +1916,8 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **name** | **str**| Prefix matched search string on deployment name. | [optional] + **name** | **str**| Substring matched search string on deployment name. | [optional] + **tags** | **str**| Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] @@ -1980,7 +1982,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.DeploymentsApi(api_client) deployment_id = 'deployment_id_example' # str | - subdomain = 'subdomain_example' # str | Prefix matched search string on route subdomain. (optional) + subdomain = 'subdomain_example' # str | Substring matched search string on route subdomain. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -2003,7 +2005,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **deployment_id** | **str**| | - **subdomain** | **str**| Prefix matched search string on route subdomain. | [optional] + **subdomain** | **str**| Substring matched search string on route subdomain. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] @@ -2067,7 +2069,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.DeploymentsApi(api_client) deployment_id = 'deployment_id_example' # str | - location = 'location_example' # str | Prefix matched search string on secret attachment location. (optional) + location = 'location_example' # str | Substring matched search string on secret attachment location. (optional) attachment_type = saturn_api.SecretAttachmentType() # SecretAttachmentType | Filter secret attachments by type. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -2091,7 +2093,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **deployment_id** | **str**| | - **location** | **str**| Prefix matched search string on secret attachment location. | [optional] + **location** | **str**| Substring matched search string on secret attachment location. | [optional] **attachment_type** | [**SecretAttachmentType**](.md)| Filter secret attachments by type. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/ExternalReposApi.md b/docs/ExternalReposApi.md index de63ac4..33a620f 100644 --- a/docs/ExternalReposApi.md +++ b/docs/ExternalReposApi.md @@ -286,7 +286,7 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - remote_url = 'remote_url_example' # str | Prefix matched search string on repository remote URL. (optional) + remote_url = 'remote_url_example' # str | Substring matched search string on repository remote URL. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -314,7 +314,7 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **remote_url** | **str**| Prefix matched search string on repository remote URL. | [optional] + **remote_url** | **str**| Substring matched search string on repository remote URL. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index e67535e..58a375f 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -520,7 +520,7 @@ configuration = saturn_api.Configuration( async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.GroupsApi(api_client) - name = 'name_example' # str | Prefix matched search string on group name. (optional) + name = 'name_example' # str | Substring matched search string on group name. (optional) org_id = 'org_id_example' # str | Org ID to query for groups. Defaults to the default org for the authenticated user. (optional) all_groups = False # bool | Search for all groups in the org, instead of only groups the authenticated user is a member of. (optional) (default to False) prev_key = 'prev_key_example' # str | Previous page key. (optional) @@ -544,7 +544,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Prefix matched search string on group name. | [optional] + **name** | **str**| Substring matched search string on group name. | [optional] **org_id** | **str**| Org ID to query for groups. Defaults to the default org for the authenticated user. | [optional] **all_groups** | **bool**| Search for all groups in the org, instead of only groups the authenticated user is a member of. | [optional] [default to False] **prev_key** | **str**| Previous page key. | [optional] @@ -609,7 +609,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.GroupsApi(api_client) group_id = 'group_id_example' # str | - name = 'name_example' # str | Prefix matched search string on group member username. (optional) + name = 'name_example' # str | Substring matched search string on group member username. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -632,7 +632,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_id** | **str**| | - **name** | **str**| Prefix matched search string on group member username. | [optional] + **name** | **str**| Substring matched search string on group member username. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] diff --git a/docs/ImageTagsApi.md b/docs/ImageTagsApi.md index 5517201..1c56cb9 100644 --- a/docs/ImageTagsApi.md +++ b/docs/ImageTagsApi.md @@ -540,8 +540,8 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.ImageTagsApi(api_client) image_id = 'image_id_example' # str | - version = 'version_example' # str | Prefix matched search string on image tag version. (optional) - image_uri = 'image_uri_example' # str | Prefix matched search string on image tag URI. (optional) + version = 'version_example' # str | Substring matched search string on image tag version. (optional) + image_uri = 'image_uri_example' # str | Substring matched search string on image tag URI. (optional) is_external = True # bool | Filter image tags by is_external. (optional) archived = True # bool | Filter images tags by archived. (optional) status = saturn_api.ImageBuildStatus() # ImageBuildStatus | Filter image tags by build status. (optional) @@ -567,8 +567,8 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **image_id** | **str**| | - **version** | **str**| Prefix matched search string on image tag version. | [optional] - **image_uri** | **str**| Prefix matched search string on image tag URI. | [optional] + **version** | **str**| Substring matched search string on image tag version. | [optional] + **image_uri** | **str**| Substring matched search string on image tag URI. | [optional] **is_external** | **bool**| Filter image tags by is_external. | [optional] **archived** | **bool**| Filter images tags by archived. | [optional] **status** | [**ImageBuildStatus**](.md)| Filter image tags by build status. | [optional] diff --git a/docs/ImagesApi.md b/docs/ImagesApi.md index 2e22642..8a329d1 100644 --- a/docs/ImagesApi.md +++ b/docs/ImagesApi.md @@ -288,7 +288,7 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - name = 'name_example' # str | Prefix matched search string on image name. (optional) + name = 'name_example' # str | Substring matched search string on image name. (optional) access = saturn_api.ImageAccessLevel() # ImageAccessLevel | Filter images by access level. (optional) supports = 'supports_example' # str | Filter images by supported features. (optional) hardware_type = saturn_api.HardwareType() # HardwareType | Filter images by hardware type. (optional) @@ -320,7 +320,7 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **name** | **str**| Prefix matched search string on image name. | [optional] + **name** | **str**| Substring matched search string on image name. | [optional] **access** | [**ImageAccessLevel**](.md)| Filter images by access level. | [optional] **supports** | **str**| Filter images by supported features. | [optional] **hardware_type** | [**HardwareType**](.md)| Filter images by hardware type. | [optional] diff --git a/docs/InstanceSize.md b/docs/InstanceSize.md index 08412f6..cb1449e 100644 --- a/docs/InstanceSize.md +++ b/docs/InstanceSize.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **display_name** | **str** | | **price_per_hour** | **float** | | [optional] **description** | **str** | | [optional] [default to ''] +**disabled** | **bool** | | [optional] [default to False] +**disabled_message** | **str** | | [optional] [default to ''] ## Example diff --git a/docs/InvitationsApi.md b/docs/InvitationsApi.md index 4db3fa1..cdbd295 100644 --- a/docs/InvitationsApi.md +++ b/docs/InvitationsApi.md @@ -282,7 +282,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.InvitationsApi(api_client) status = saturn_api.InvitationStatus() # InvitationStatus | Filter invitations by status. (optional) - email = 'email_example' # str | Prefix matched search string on email. (optional) + email = 'email_example' # str | Substring matched search string on email. (optional) invitor_id = 'invitor_id_example' # str | Filter invitations by invitor user ID. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -306,7 +306,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **status** | [**InvitationStatus**](.md)| Filter invitations by status. | [optional] - **email** | **str**| Prefix matched search string on email. | [optional] + **email** | **str**| Substring matched search string on email. | [optional] **invitor_id** | **str**| Filter invitations by invitor user ID. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/Job.md b/docs/Job.md index 92b9387..6b18140 100644 --- a/docs/Job.md +++ b/docs/Job.md @@ -21,6 +21,7 @@ Name | Type | Description | Notes **is_spot** | **bool** | Enables running on spot instance sizes. | [readonly] **start_dind** | **bool** | Enables docker-in-docker. | [readonly] **scale** | **int** | Number of pod replicas. | [readonly] +**retries** | **int** | Maximum number of retries for a failed job. | [readonly] **k8s_name** | **str** | Unique name for associated kubernetes objects. | [readonly] **require_restart** | **bool** | True if an update was applied that requires restart to take effect. | [readonly] **resource_type** | **str** | Resource type of the job. | [readonly] diff --git a/docs/JobCreate.md b/docs/JobCreate.md index d0124bc..a7c9f7e 100644 --- a/docs/JobCreate.md +++ b/docs/JobCreate.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **start_dind** | **bool** | Enables docker-in-docker. | [optional] [default to False] **command** | **str** | Command that runs on start. | **scale** | **int** | Number of pod replicas. | [optional] [default to 1] +**retries** | **int** | Maximum number of retries for a failed job. | [optional] [default to 0] **cron_schedule_options** | [**CronScheduleCreate**](CronScheduleCreate.md) | Cron schedule configuration for scheduled jobs. | [optional] ## Example diff --git a/docs/JobUpdate.md b/docs/JobUpdate.md index c0b03e2..4e4c284 100644 --- a/docs/JobUpdate.md +++ b/docs/JobUpdate.md @@ -21,6 +21,7 @@ Name | Type | Description | Notes **start_dind** | **bool** | Enables docker-in-docker. | [optional] **command** | **str** | Command that runs on start. | [optional] **scale** | **int** | Number of pod replicas. | [optional] +**retries** | **int** | Maximum number of retries for a failed job. | [optional] **cron_schedule_options** | [**CronScheduleUpdate**](CronScheduleUpdate.md) | Cron schedule configuration for scheduled jobs. | [optional] ## Example diff --git a/docs/JobsApi.md b/docs/JobsApi.md index 7d5c96b..6137ee5 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -1445,7 +1445,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list** -> JobList list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) +> JobList list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) List jobs @@ -1487,7 +1487,8 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - name = 'name_example' # str | Prefix matched search string on job name. (optional) + name = 'name_example' # str | Substring matched search string on job name. (optional) + tags = 'tags_example' # str | Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -1495,7 +1496,7 @@ async with saturn_api.ApiClient(configuration) as api_client: try: # List jobs - api_response = await api_instance.list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + api_response = await api_instance.list(owner_name=owner_name, owner_id=owner_id, user_id=user_id, group_id=group_id, org_id=org_id, owner=owner, name=name, tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) print("The response of JobsApi->list:\n") pprint(api_response) except Exception as e: @@ -1515,7 +1516,8 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **name** | **str**| Prefix matched search string on job name. | [optional] + **name** | **str**| Substring matched search string on job name. | [optional] + **tags** | **str**| Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] @@ -1663,7 +1665,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.JobsApi(api_client) job_id = 'job_id_example' # str | - location = 'location_example' # str | Prefix matched search string on secret attachment location. (optional) + location = 'location_example' # str | Substring matched search string on secret attachment location. (optional) attachment_type = saturn_api.SecretAttachmentType() # SecretAttachmentType | Filter secret attachments by type. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -1687,7 +1689,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **job_id** | **str**| | - **location** | **str**| Prefix matched search string on secret attachment location. | [optional] + **location** | **str**| Substring matched search string on secret attachment location. | [optional] **attachment_type** | [**SecretAttachmentType**](.md)| Filter secret attachments by type. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/LimitsApi.md b/docs/LimitsApi.md index ac483b0..b0a88c7 100644 --- a/docs/LimitsApi.md +++ b/docs/LimitsApi.md @@ -280,7 +280,7 @@ configuration = saturn_api.Configuration( async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.LimitsApi(api_client) - name = 'name_example' # str | Prefix matched search string on usage limit name. (optional) + name = 'name_example' # str | Substring matched search string on usage limit name. (optional) org_id = 'org_id_example' # str | Filter usage limits by org. Defaults to the default org for the current user/group. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -303,7 +303,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Prefix matched search string on usage limit name. | [optional] + **name** | **str**| Substring matched search string on usage limit name. | [optional] **org_id** | **str**| Filter usage limits by org. Defaults to the default org for the current user/group. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/Org.md b/docs/Org.md index 465a937..5414e50 100644 --- a/docs/Org.md +++ b/docs/Org.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **website_url** | **str** | Website URL of the org. | [readonly] **logo_image_url** | **str** | Logo of the org. | [readonly] **limits_id** | **str** | Usage limits ID applied to the entire org. | [readonly] +**limits** | [**UsageLimits**](UsageLimits.md) | Usage limits applied to the entire org, if set. | [optional] [readonly] **is_primary** | **bool** | Primary org for the account. | [readonly] **locked** | **bool** | Locked orgs have restricted access to the API. | [readonly] **locked_reason** | **str** | Reason for the org being locked. | [readonly] diff --git a/docs/OrgsApi.md b/docs/OrgsApi.md index d22ee10..458efbb 100644 --- a/docs/OrgsApi.md +++ b/docs/OrgsApi.md @@ -1318,7 +1318,7 @@ configuration = saturn_api.Configuration( async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.OrgsApi(api_client) - name = 'name_example' # str | Prefix matched search string on org name. (optional) + name = 'name_example' # str | Substring matched search string on org name. (optional) all_orgs = True # bool | List all orgs, instead of only orgs the user is a member of. (Admin only) (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -1341,7 +1341,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Prefix matched search string on org name. | [optional] + **name** | **str**| Substring matched search string on org name. | [optional] **all_orgs** | **bool**| List all orgs, instead of only orgs the user is a member of. (Admin only) | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] @@ -1407,7 +1407,7 @@ async with saturn_api.ApiClient(configuration) as api_client: api_instance = saturn_api.OrgsApi(api_client) org_id = 'org_id_example' # str | status = saturn_api.InvitationStatus() # InvitationStatus | Filter org invitations by status. (optional) - email = 'email_example' # str | Prefix matched search string on email. (optional) + email = 'email_example' # str | Substring matched search string on email. (optional) invitor_id = 'invitor_id_example' # str | Filter invitations by invitor user ID. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -1432,7 +1432,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org_id** | **str**| | **status** | [**InvitationStatus**](.md)| Filter org invitations by status. | [optional] - **email** | **str**| Prefix matched search string on email. | [optional] + **email** | **str**| Substring matched search string on email. | [optional] **invitor_id** | **str**| Filter invitations by invitor user ID. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] @@ -1499,7 +1499,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.OrgsApi(api_client) org_id = 'org_id_example' # str | - name = 'name_example' # str | Prefix matched search string by owner identity name. (optional) + name = 'name_example' # str | Substring matched search string by owner identity name. (optional) identity_type = saturn_api.IdentityType() # IdentityType | Filter owners by identity type. (optional) all_users = False # bool | List all user owners, instead of just the authenticated user. (optional) (default to False) all_groups = False # bool | List all group owners, instead of just groups the authenticated user is a member of. (optional) (default to False) @@ -1526,7 +1526,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org_id** | **str**| | - **name** | **str**| Prefix matched search string by owner identity name. | [optional] + **name** | **str**| Substring matched search string by owner identity name. | [optional] **identity_type** | [**IdentityType**](.md)| Filter owners by identity type. | [optional] **all_users** | **bool**| List all user owners, instead of just the authenticated user. | [optional] [default to False] **all_groups** | **bool**| List all group owners, instead of just groups the authenticated user is a member of. | [optional] [default to False] diff --git a/docs/Resource.md b/docs/Resource.md index 2a7c654..0885ec3 100644 --- a/docs/Resource.md +++ b/docs/Resource.md @@ -52,6 +52,7 @@ Name | Type | Description | Notes **debug_mode** | **bool** | True if workspace is running in debug mode. | [readonly] **ssh_url** | **str** | External SSH URL for the workspace. | [readonly] **cron_schedule_options** | [**CronSchedule**](CronSchedule.md) | Cron schedule configuration for scheduled jobs. | [optional] [readonly] +**retries** | **int** | Maximum number of retries for a failed job. | [readonly] **scheduled** | **bool** | True if job is currently scheduled. | [readonly] **ide** | **str** | IDE of the workspace | [readonly] **disk_space** | **str** | Size of the persistent volume attached to the workspace. | [readonly] diff --git a/docs/ResourceState.md b/docs/ResourceState.md index 24599e7..ee5c072 100644 --- a/docs/ResourceState.md +++ b/docs/ResourceState.md @@ -8,6 +8,10 @@ Name | Type | Description | Notes **id** | **str** | | [readonly] **action** | **str** | | [optional] [readonly] **status** | **str** | | [readonly] +**url** | **str** | External URL for the primary route, if applicable. | [optional] [readonly] +**ssh_url** | **str** | External SSH URL for the resource when SSH is enabled. | [optional] [readonly] +**ssh_user** | **str** | SSH username for the resource when SSH is enabled. | [optional] [readonly] +**routes** | [**List[RouteState]**](RouteState.md) | External URL for each route exposed by the resource. | [optional] [readonly] ## Example diff --git a/docs/RouteState.md b/docs/RouteState.md new file mode 100644 index 0000000..49e4c63 --- /dev/null +++ b/docs/RouteState.md @@ -0,0 +1,31 @@ +# RouteState + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subdomain** | **str** | | [readonly] +**container_port** | **int** | | [readonly] +**url** | **str** | | [readonly] + +## Example + +```python +from saturn_api.models.route_state import RouteState + +# TODO update the JSON string below +json = "{}" +# create an instance of RouteState from a JSON string +route_state_instance = RouteState.from_json(json) +# print the JSON string representation of the object +print(RouteState.to_json()) + +# convert the object into a dict +route_state_dict = route_state_instance.to_dict() +# create an instance of RouteState from a dict +route_state_from_dict = RouteState.from_dict(route_state_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SecretsApi.md b/docs/SecretsApi.md index b14d9ce..cd3f3ef 100644 --- a/docs/SecretsApi.md +++ b/docs/SecretsApi.md @@ -287,7 +287,7 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - name = 'name_example' # str | Prefix matched search string on secret name. (optional) + name = 'name_example' # str | Substring matched search string on secret name. (optional) access = saturn_api.SecretAccessLevel() # SecretAccessLevel | Filter secrets by access level. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -316,7 +316,7 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **name** | **str**| Prefix matched search string on secret name. | [optional] + **name** | **str**| Substring matched search string on secret name. | [optional] **access** | [**SecretAccessLevel**](.md)| Filter secrets by access level. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/ServiceAccountEntitlementsApi.md b/docs/ServiceAccountEntitlementsApi.md index d3da20d..79d732d 100644 --- a/docs/ServiceAccountEntitlementsApi.md +++ b/docs/ServiceAccountEntitlementsApi.md @@ -282,7 +282,7 @@ async with saturn_api.ApiClient(configuration) as api_client: user_id = 'user_id_example' # str | Identity reference by user ID (optional) group_id = 'group_id_example' # str | Identity reference by group ID (optional) identity = 'identity_example' # str | Identity reference by name (optional) - name = 'name_example' # str | Prefix matched search string on entitled service account name. (optional) + name = 'name_example' # str | Substring matched search string on entitled service account name. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -307,7 +307,7 @@ Name | Type | Description | Notes **user_id** | **str**| Identity reference by user ID | [optional] **group_id** | **str**| Identity reference by group ID | [optional] **identity** | **str**| Identity reference by name | [optional] - **name** | **str**| Prefix matched search string on entitled service account name. | [optional] + **name** | **str**| Substring matched search string on entitled service account name. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] diff --git a/docs/ServiceAccountsApi.md b/docs/ServiceAccountsApi.md index 0c5feea..9a6bced 100644 --- a/docs/ServiceAccountsApi.md +++ b/docs/ServiceAccountsApi.md @@ -280,7 +280,7 @@ configuration = saturn_api.Configuration( async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.ServiceAccountsApi(api_client) - name = 'name_example' # str | Prefix matched search string on service account name. (optional) + name = 'name_example' # str | Substring matched search string on service account name. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -302,7 +302,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Prefix matched search string on service account name. | [optional] + **name** | **str**| Substring matched search string on service account name. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] diff --git a/docs/SharedFoldersApi.md b/docs/SharedFoldersApi.md index 40059f6..f5ca871 100644 --- a/docs/SharedFoldersApi.md +++ b/docs/SharedFoldersApi.md @@ -287,7 +287,7 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - name = 'name_example' # str | Prefix matched search string on shared folder name. (optional) + name = 'name_example' # str | Substring matched search string on shared folder name. (optional) access = saturn_api.SharedFolderAccessLevel() # SharedFolderAccessLevel | Filter shared folders by access level. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -316,7 +316,7 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **name** | **str**| Prefix matched search string on shared folder name. | [optional] + **name** | **str**| Substring matched search string on shared folder name. | [optional] **access** | [**SharedFolderAccessLevel**](.md)| Filter shared folders by access level. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/SshPrivateKeysApi.md b/docs/SshPrivateKeysApi.md index fda26cd..a9cc7d9 100644 --- a/docs/SshPrivateKeysApi.md +++ b/docs/SshPrivateKeysApi.md @@ -283,7 +283,7 @@ async with saturn_api.ApiClient(configuration) as api_client: user_id = 'user_id_example' # str | Identity reference by user ID (optional) group_id = 'group_id_example' # str | Identity reference by group ID (optional) identity = 'identity_example' # str | Identity reference by name (optional) - name = 'name_example' # str | Prefix matched search string on SSH private key name. (optional) + name = 'name_example' # str | Substring matched search string on SSH private key name. (optional) is_default = True # bool | Filter SSH private keys by is_default. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -309,7 +309,7 @@ Name | Type | Description | Notes **user_id** | **str**| Identity reference by user ID | [optional] **group_id** | **str**| Identity reference by group ID | [optional] **identity** | **str**| Identity reference by name | [optional] - **name** | **str**| Prefix matched search string on SSH private key name. | [optional] + **name** | **str**| Substring matched search string on SSH private key name. | [optional] **is_default** | **bool**| Filter SSH private keys by is_default. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/SshPublicKeysApi.md b/docs/SshPublicKeysApi.md index 7275099..0d1c0ba 100644 --- a/docs/SshPublicKeysApi.md +++ b/docs/SshPublicKeysApi.md @@ -283,7 +283,7 @@ async with saturn_api.ApiClient(configuration) as api_client: user_id = 'user_id_example' # str | Identity reference by user ID (optional) group_id = 'group_id_example' # str | Identity reference by group ID (optional) identity = 'identity_example' # str | Identity reference by name (optional) - name = 'name_example' # str | Prefix matched search string on SSH public key name. (optional) + name = 'name_example' # str | Substring matched search string on SSH public key name. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -308,7 +308,7 @@ Name | Type | Description | Notes **user_id** | **str**| Identity reference by user ID | [optional] **group_id** | **str**| Identity reference by group ID | [optional] **identity** | **str**| Identity reference by name | [optional] - **name** | **str**| Prefix matched search string on SSH public key name. | [optional] + **name** | **str**| Substring matched search string on SSH public key name. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] diff --git a/docs/UsersApi.md b/docs/UsersApi.md index cc0e63a..0e2e7c3 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -282,8 +282,8 @@ configuration = saturn_api.Configuration( async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.UsersApi(api_client) - username = 'username_example' # str | Prefix matched search string on user name. (optional) - email = 'email_example' # str | Prefix matched search string on user email. (optional) + username = 'username_example' # str | Substring matched search string on user name. (optional) + email = 'email_example' # str | Substring matched search string on user email. (optional) details = False # bool | Retrieve detailed user data. (Admin only) (optional) (default to False) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -306,8 +306,8 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **str**| Prefix matched search string on user name. | [optional] - **email** | **str**| Prefix matched search string on user email. | [optional] + **username** | **str**| Substring matched search string on user name. | [optional] + **email** | **str**| Substring matched search string on user email. | [optional] **details** | **bool**| Retrieve detailed user data. (Admin only) | [optional] [default to False] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/docs/WhiteLabelConfiguration.md b/docs/WhiteLabelConfiguration.md index dac6b48..0e306bf 100644 --- a/docs/WhiteLabelConfiguration.md +++ b/docs/WhiteLabelConfiguration.md @@ -8,10 +8,13 @@ Name | Type | Description | Notes **enabled** | **bool** | Enable whitelabel configuration. | **brand_name** | **str** | Whitelabeled brand name. | **brand_short_name** | **str** | Short version of the brand name. | [optional] +**logo_mode** | **str** | Logo display mode: 'icon_and_text' or 'logo_only'. | [optional] [default to 'icon_and_text'] **logo_icon_url** | **str** | Brand icon URL. | **logo_full_url** | **str** | Brand full icon URL. | **favicon_url** | **str** | Favicon URL. | [optional] **primary_color** | **str** | Primary frontend color. | +**cloud_display_names** | **Dict[str, str]** | Map of cloud provider IDs to display names (e.g. {'nebius': 'My Cloud'}). | [optional] +**cloud_icon_urls** | **Dict[str, str]** | Map of cloud provider IDs to icon URLs. | [optional] **support_email** | **str** | Support contact email. | **website_url** | **str** | Website URL. | **docs_url** | **str** | Documentation URL. | [optional] diff --git a/docs/WorkspacesApi.md b/docs/WorkspacesApi.md index 0a065e8..5275821 100644 --- a/docs/WorkspacesApi.md +++ b/docs/WorkspacesApi.md @@ -1966,7 +1966,7 @@ async with saturn_api.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | Reference owner by group ID. (optional) org_id = 'org_id_example' # str | Reference owner by org ID. (optional) owner = 'owner_example' # str | Reference owner by name. (optional) - name = 'name_example' # str | Prefix matched search string on workspace name. (optional) + name = 'name_example' # str | Substring matched search string on workspace name. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -1994,7 +1994,7 @@ Name | Type | Description | Notes **group_id** | **str**| Reference owner by group ID. | [optional] **org_id** | **str**| Reference owner by org ID. | [optional] **owner** | **str**| Reference owner by name. | [optional] - **name** | **str**| Prefix matched search string on workspace name. | [optional] + **name** | **str**| Substring matched search string on workspace name. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] @@ -2059,7 +2059,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.WorkspacesApi(api_client) workspace_id = 'workspace_id_example' # str | - subdomain = 'subdomain_example' # str | Prefix matched search string on route subdomain. (optional) + subdomain = 'subdomain_example' # str | Substring matched search string on route subdomain. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) page_size = 100 # int | Page size. (optional) (default to 100) @@ -2082,7 +2082,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workspace_id** | **str**| | - **subdomain** | **str**| Prefix matched search string on route subdomain. | [optional] + **subdomain** | **str**| Substring matched search string on route subdomain. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] **page_size** | **int**| Page size. | [optional] [default to 100] @@ -2146,7 +2146,7 @@ async with saturn_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = saturn_api.WorkspacesApi(api_client) workspace_id = 'workspace_id_example' # str | - location = 'location_example' # str | Prefix matched search string on secret attachment location. (optional) + location = 'location_example' # str | Substring matched search string on secret attachment location. (optional) attachment_type = saturn_api.SecretAttachmentType() # SecretAttachmentType | Filter secret attachments by type. (optional) prev_key = 'prev_key_example' # str | Previous page key. (optional) next_key = 'next_key_example' # str | Next page key. (optional) @@ -2170,7 +2170,7 @@ async with saturn_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workspace_id** | **str**| | - **location** | **str**| Prefix matched search string on secret attachment location. | [optional] + **location** | **str**| Substring matched search string on secret attachment location. | [optional] **attachment_type** | [**SecretAttachmentType**](.md)| Filter secret attachments by type. | [optional] **prev_key** | **str**| Previous page key. | [optional] **next_key** | **str**| Next page key. | [optional] diff --git a/requirements.txt b/requirements.txt index 6ab392f..e8de160 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 httpx = ">= 0.28.1" -pydantic >= 2 +pydantic >= 2.11 typing-extensions >= 4.7.1 diff --git a/saturn_api/__init__.py b/saturn_api/__init__.py index 8d75f17..fe14a76 100644 --- a/saturn_api/__init__.py +++ b/saturn_api/__init__.py @@ -3,16 +3,17 @@ # flake8: noqa """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + __version__ = "1.0.0" # Define package exports @@ -21,6 +22,7 @@ "ApiStatusApi", "ApiTokensApi", "AuthorizationApi", + "ClustersApi", "CurrentUserApi", "DaskClustersApi", "DeploymentsApi", @@ -70,6 +72,11 @@ "AuthorizationRefreshGrant", "AuthorizationTokenResponse", "BuildData", + "Cluster", + "ClusterConnectionType", + "ClusterCreate", + "ClusterList", + "ClusterUpdate", "ConcurrencyPolicy", "Condition", "ContainerRuntimeSummary", @@ -258,6 +265,7 @@ "RouteCreate", "RouteList", "RouteReference", + "RouteState", "RouteUpdate", "SSHPrivateKey", "SSHPrivateKeyCreate", @@ -343,12 +351,11 @@ from saturn_api.api.api_status_api import ApiStatusApi as ApiStatusApi from saturn_api.api.api_tokens_api import ApiTokensApi as ApiTokensApi from saturn_api.api.authorization_api import AuthorizationApi as AuthorizationApi +from saturn_api.api.clusters_api import ClustersApi as ClustersApi from saturn_api.api.current_user_api import CurrentUserApi as CurrentUserApi from saturn_api.api.dask_clusters_api import DaskClustersApi as DaskClustersApi from saturn_api.api.deployments_api import DeploymentsApi as DeploymentsApi -from saturn_api.api.external_repo_attachments_api import ( - ExternalRepoAttachmentsApi as ExternalRepoAttachmentsApi, -) +from saturn_api.api.external_repo_attachments_api import ExternalRepoAttachmentsApi as ExternalRepoAttachmentsApi from saturn_api.api.external_repos_api import ExternalReposApi as ExternalReposApi from saturn_api.api.groups_api import GroupsApi as GroupsApi from saturn_api.api.image_tags_api import ImageTagsApi as ImageTagsApi @@ -362,34 +369,28 @@ from saturn_api.api.orgs_api import OrgsApi as OrgsApi from saturn_api.api.recipes_api import RecipesApi as RecipesApi from saturn_api.api.secrets_api import SecretsApi as SecretsApi -from saturn_api.api.service_account_entitlements_api import ( - ServiceAccountEntitlementsApi as ServiceAccountEntitlementsApi, -) +from saturn_api.api.service_account_entitlements_api import ServiceAccountEntitlementsApi as ServiceAccountEntitlementsApi from saturn_api.api.service_accounts_api import ServiceAccountsApi as ServiceAccountsApi -from saturn_api.api.shared_folder_attachments_api import ( - SharedFolderAttachmentsApi as SharedFolderAttachmentsApi, -) +from saturn_api.api.shared_folder_attachments_api import SharedFolderAttachmentsApi as SharedFolderAttachmentsApi from saturn_api.api.shared_folders_api import SharedFoldersApi as SharedFoldersApi from saturn_api.api.ssh_private_keys_api import SshPrivateKeysApi as SshPrivateKeysApi from saturn_api.api.ssh_public_keys_api import SshPublicKeysApi as SshPublicKeysApi from saturn_api.api.users_api import UsersApi as UsersApi from saturn_api.api.workspaces_api import WorkspacesApi as WorkspacesApi -from saturn_api.api_client import ApiClient as ApiClient # import ApiClient from saturn_api.api_response import ApiResponse as ApiResponse +from saturn_api.api_client import ApiClient as ApiClient from saturn_api.configuration import Configuration as Configuration -from saturn_api.exceptions import ApiAttributeError as ApiAttributeError -from saturn_api.exceptions import ApiException as ApiException -from saturn_api.exceptions import ApiKeyError as ApiKeyError +from saturn_api.exceptions import OpenApiException as OpenApiException from saturn_api.exceptions import ApiTypeError as ApiTypeError from saturn_api.exceptions import ApiValueError as ApiValueError -from saturn_api.exceptions import OpenApiException as OpenApiException +from saturn_api.exceptions import ApiKeyError as ApiKeyError +from saturn_api.exceptions import ApiAttributeError as ApiAttributeError +from saturn_api.exceptions import ApiException as ApiException # import models into sdk package -from saturn_api.models.active_resource_list import ( - ActiveResourceList as ActiveResourceList, -) +from saturn_api.models.active_resource_list import ActiveResourceList as ActiveResourceList from saturn_api.models.aggregated_usage import AggregatedUsage as AggregatedUsage from saturn_api.models.api_status import ApiStatus as ApiStatus from saturn_api.models.api_token import ApiToken as ApiToken @@ -399,60 +400,39 @@ from saturn_api.models.api_token_update import ApiTokenUpdate as ApiTokenUpdate from saturn_api.models.app_info import AppInfo as AppInfo from saturn_api.models.auth0_info import Auth0Info as Auth0Info -from saturn_api.models.authorization_code_grant import ( - AuthorizationCodeGrant as AuthorizationCodeGrant, -) -from saturn_api.models.authorization_grant import ( - AuthorizationGrant as AuthorizationGrant, -) -from saturn_api.models.authorization_refresh_grant import ( - AuthorizationRefreshGrant as AuthorizationRefreshGrant, -) -from saturn_api.models.authorization_token_response import ( - AuthorizationTokenResponse as AuthorizationTokenResponse, -) +from saturn_api.models.authorization_code_grant import AuthorizationCodeGrant as AuthorizationCodeGrant +from saturn_api.models.authorization_grant import AuthorizationGrant as AuthorizationGrant +from saturn_api.models.authorization_refresh_grant import AuthorizationRefreshGrant as AuthorizationRefreshGrant +from saturn_api.models.authorization_token_response import AuthorizationTokenResponse as AuthorizationTokenResponse from saturn_api.models.build_data import BuildData as BuildData +from saturn_api.models.cluster import Cluster as Cluster +from saturn_api.models.cluster_connection_type import ClusterConnectionType as ClusterConnectionType +from saturn_api.models.cluster_create import ClusterCreate as ClusterCreate +from saturn_api.models.cluster_list import ClusterList as ClusterList +from saturn_api.models.cluster_update import ClusterUpdate as ClusterUpdate from saturn_api.models.concurrency_policy import ConcurrencyPolicy as ConcurrencyPolicy from saturn_api.models.condition import Condition as Condition -from saturn_api.models.container_runtime_summary import ( - ContainerRuntimeSummary as ContainerRuntimeSummary, -) +from saturn_api.models.container_runtime_summary import ContainerRuntimeSummary as ContainerRuntimeSummary from saturn_api.models.container_status import ContainerStatus as ContainerStatus from saturn_api.models.cron_schedule import CronSchedule as CronSchedule -from saturn_api.models.cron_schedule_create import ( - CronScheduleCreate as CronScheduleCreate, -) -from saturn_api.models.cron_schedule_update import ( - CronScheduleUpdate as CronScheduleUpdate, -) +from saturn_api.models.cron_schedule_create import CronScheduleCreate as CronScheduleCreate +from saturn_api.models.cron_schedule_update import CronScheduleUpdate as CronScheduleUpdate from saturn_api.models.daily_usage import DailyUsage as DailyUsage from saturn_api.models.daily_usage_list import DailyUsageList as DailyUsageList from saturn_api.models.dask_cluster import DaskCluster as DaskCluster from saturn_api.models.dask_cluster_adapt import DaskClusterAdapt as DaskClusterAdapt -from saturn_api.models.dask_cluster_attachment import ( - DaskClusterAttachment as DaskClusterAttachment, -) -from saturn_api.models.dask_cluster_attachment_scheduler import ( - DaskClusterAttachmentScheduler as DaskClusterAttachmentScheduler, -) -from saturn_api.models.dask_cluster_attachment_worker import ( - DaskClusterAttachmentWorker as DaskClusterAttachmentWorker, -) +from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment as DaskClusterAttachment +from saturn_api.models.dask_cluster_attachment_scheduler import DaskClusterAttachmentScheduler as DaskClusterAttachmentScheduler +from saturn_api.models.dask_cluster_attachment_worker import DaskClusterAttachmentWorker as DaskClusterAttachmentWorker from saturn_api.models.dask_cluster_create import DaskClusterCreate as DaskClusterCreate from saturn_api.models.dask_cluster_list import DaskClusterList as DaskClusterList from saturn_api.models.dask_cluster_nested import DaskClusterNested as DaskClusterNested -from saturn_api.models.dask_cluster_runtime_summary import ( - DaskClusterRuntimeSummary as DaskClusterRuntimeSummary, -) +from saturn_api.models.dask_cluster_runtime_summary import DaskClusterRuntimeSummary as DaskClusterRuntimeSummary from saturn_api.models.dask_cluster_scale import DaskClusterScale as DaskClusterScale -from saturn_api.models.dask_cluster_server_options import ( - DaskClusterServerOptions as DaskClusterServerOptions, -) +from saturn_api.models.dask_cluster_server_options import DaskClusterServerOptions as DaskClusterServerOptions from saturn_api.models.dask_cluster_update import DaskClusterUpdate as DaskClusterUpdate from saturn_api.models.dask_components import DaskComponents as DaskComponents -from saturn_api.models.dask_worker_runtime_summary_list import ( - DaskWorkerRuntimeSummaryList as DaskWorkerRuntimeSummaryList, -) +from saturn_api.models.dask_worker_runtime_summary_list import DaskWorkerRuntimeSummaryList as DaskWorkerRuntimeSummaryList from saturn_api.models.dask_worker_summary import DaskWorkerSummary as DaskWorkerSummary from saturn_api.models.data_point import DataPoint as DataPoint from saturn_api.models.default_images import DefaultImages as DefaultImages @@ -461,58 +441,28 @@ from saturn_api.models.deployment_create import DeploymentCreate as DeploymentCreate from saturn_api.models.deployment_list import DeploymentList as DeploymentList from saturn_api.models.deployment_recipe import DeploymentRecipe as DeploymentRecipe -from saturn_api.models.deployment_route_recipe import ( - DeploymentRouteRecipe as DeploymentRouteRecipe, -) -from saturn_api.models.deployment_runtime_summary import ( - DeploymentRuntimeSummary as DeploymentRuntimeSummary, -) -from saturn_api.models.deployment_server_info import ( - DeploymentServerInfo as DeploymentServerInfo, -) +from saturn_api.models.deployment_route_recipe import DeploymentRouteRecipe as DeploymentRouteRecipe +from saturn_api.models.deployment_runtime_summary import DeploymentRuntimeSummary as DeploymentRuntimeSummary +from saturn_api.models.deployment_server_info import DeploymentServerInfo as DeploymentServerInfo from saturn_api.models.deployment_spec import DeploymentSpec as DeploymentSpec from saturn_api.models.deployment_start import DeploymentStart as DeploymentStart from saturn_api.models.deployment_status import DeploymentStatus as DeploymentStatus from saturn_api.models.deployment_update import DeploymentUpdate as DeploymentUpdate from saturn_api.models.external_repo import ExternalRepo as ExternalRepo -from saturn_api.models.external_repo_attachment import ( - ExternalRepoAttachment as ExternalRepoAttachment, -) -from saturn_api.models.external_repo_attachment_create import ( - ExternalRepoAttachmentCreate as ExternalRepoAttachmentCreate, -) -from saturn_api.models.external_repo_attachment_list import ( - ExternalRepoAttachmentList as ExternalRepoAttachmentList, -) -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested as ExternalRepoAttachmentNested, -) -from saturn_api.models.external_repo_attachment_recipe import ( - ExternalRepoAttachmentRecipe as ExternalRepoAttachmentRecipe, -) -from saturn_api.models.external_repo_attachment_update import ( - ExternalRepoAttachmentUpdate as ExternalRepoAttachmentUpdate, -) -from saturn_api.models.external_repo_create import ( - ExternalRepoCreate as ExternalRepoCreate, -) +from saturn_api.models.external_repo_attachment import ExternalRepoAttachment as ExternalRepoAttachment +from saturn_api.models.external_repo_attachment_create import ExternalRepoAttachmentCreate as ExternalRepoAttachmentCreate +from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList as ExternalRepoAttachmentList +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested as ExternalRepoAttachmentNested +from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe as ExternalRepoAttachmentRecipe +from saturn_api.models.external_repo_attachment_update import ExternalRepoAttachmentUpdate as ExternalRepoAttachmentUpdate +from saturn_api.models.external_repo_create import ExternalRepoCreate as ExternalRepoCreate from saturn_api.models.external_repo_list import ExternalRepoList as ExternalRepoList -from saturn_api.models.external_repo_update import ( - ExternalRepoUpdate as ExternalRepoUpdate, -) +from saturn_api.models.external_repo_update import ExternalRepoUpdate as ExternalRepoUpdate from saturn_api.models.extra_packages import ExtraPackages as ExtraPackages -from saturn_api.models.extra_packages_recipe import ( - ExtraPackagesRecipe as ExtraPackagesRecipe, -) -from saturn_api.models.extra_packages_recipe_apt import ( - ExtraPackagesRecipeApt as ExtraPackagesRecipeApt, -) -from saturn_api.models.extra_packages_recipe_conda import ( - ExtraPackagesRecipeConda as ExtraPackagesRecipeConda, -) -from saturn_api.models.extra_packages_recipe_pip import ( - ExtraPackagesRecipePip as ExtraPackagesRecipePip, -) +from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe as ExtraPackagesRecipe +from saturn_api.models.extra_packages_recipe_apt import ExtraPackagesRecipeApt as ExtraPackagesRecipeApt +from saturn_api.models.extra_packages_recipe_conda import ExtraPackagesRecipeConda as ExtraPackagesRecipeConda +from saturn_api.models.extra_packages_recipe_pip import ExtraPackagesRecipePip as ExtraPackagesRecipePip from saturn_api.models.group import Group as Group from saturn_api.models.group_create import GroupCreate as GroupCreate from saturn_api.models.group_list import GroupList as GroupList @@ -524,9 +474,7 @@ from saturn_api.models.historic_log import HistoricLog as HistoricLog from saturn_api.models.historic_log_list import HistoricLogList as HistoricLogList from saturn_api.models.identity import Identity as Identity -from saturn_api.models.identity_by_group_id import ( - IdentityByGroupId as IdentityByGroupId, -) +from saturn_api.models.identity_by_group_id import IdentityByGroupId as IdentityByGroupId from saturn_api.models.identity_by_user_id import IdentityByUserId as IdentityByUserId from saturn_api.models.identity_reference import IdentityReference as IdentityReference from saturn_api.models.identity_type import IdentityType as IdentityType @@ -543,12 +491,8 @@ from saturn_api.models.image_tag_by_name import ImageTagByName as ImageTagByName from saturn_api.models.image_tag_by_uri import ImageTagByUri as ImageTagByUri from saturn_api.models.image_tag_create import ImageTagCreate as ImageTagCreate -from saturn_api.models.image_tag_create_build import ( - ImageTagCreateBuild as ImageTagCreateBuild, -) -from saturn_api.models.image_tag_create_external import ( - ImageTagCreateExternal as ImageTagCreateExternal, -) +from saturn_api.models.image_tag_create_build import ImageTagCreateBuild as ImageTagCreateBuild +from saturn_api.models.image_tag_create_external import ImageTagCreateExternal as ImageTagCreateExternal from saturn_api.models.image_tag_list import ImageTagList as ImageTagList from saturn_api.models.image_tag_recipe import ImageTagRecipe as ImageTagRecipe from saturn_api.models.image_tag_reference import ImageTagReference as ImageTagReference @@ -567,9 +511,7 @@ from saturn_api.models.job_recipe import JobRecipe as JobRecipe from saturn_api.models.job_restart import JobRestart as JobRestart from saturn_api.models.job_runtime_summary import JobRuntimeSummary as JobRuntimeSummary -from saturn_api.models.job_runtime_summary_list import ( - JobRuntimeSummaryList as JobRuntimeSummaryList, -) +from saturn_api.models.job_runtime_summary_list import JobRuntimeSummaryList as JobRuntimeSummaryList from saturn_api.models.job_server_info import JobServerInfo as JobServerInfo from saturn_api.models.job_spec import JobSpec as JobSpec from saturn_api.models.job_start import JobStart as JobStart @@ -579,102 +521,46 @@ from saturn_api.models.metric_series import MetricSeries as MetricSeries from saturn_api.models.metrics import Metrics as Metrics from saturn_api.models.notification import Notification as Notification -from saturn_api.models.notification_acknowledged import ( - NotificationAcknowledged as NotificationAcknowledged, -) -from saturn_api.models.notification_delete import ( - NotificationDelete as NotificationDelete, -) +from saturn_api.models.notification_acknowledged import NotificationAcknowledged as NotificationAcknowledged +from saturn_api.models.notification_delete import NotificationDelete as NotificationDelete from saturn_api.models.notification_list import NotificationList as NotificationList -from saturn_api.models.notification_subscribe import ( - NotificationSubscribe as NotificationSubscribe, -) -from saturn_api.models.notification_subscription import ( - NotificationSubscription as NotificationSubscription, -) -from saturn_api.models.notification_subscription_list import ( - NotificationSubscriptionList as NotificationSubscriptionList, -) -from saturn_api.models.notification_unsubscribe import ( - NotificationUnsubscribe as NotificationUnsubscribe, -) -from saturn_api.models.object_storage_bulk_delete_results import ( - ObjectStorageBulkDeleteResults as ObjectStorageBulkDeleteResults, -) -from saturn_api.models.object_storage_bulk_download import ( - ObjectStorageBulkDownload as ObjectStorageBulkDownload, -) -from saturn_api.models.object_storage_bulk_reference import ( - ObjectStorageBulkReference as ObjectStorageBulkReference, -) -from saturn_api.models.object_storage_complete_part import ( - ObjectStorageCompletePart as ObjectStorageCompletePart, -) -from saturn_api.models.object_storage_completed_upload import ( - ObjectStorageCompletedUpload as ObjectStorageCompletedUpload, -) -from saturn_api.models.object_storage_copy_source import ( - ObjectStorageCopySource as ObjectStorageCopySource, -) -from saturn_api.models.object_storage_dir_details import ( - ObjectStorageDirDetails as ObjectStorageDirDetails, -) -from saturn_api.models.object_storage_file_details import ( - ObjectStorageFileDetails as ObjectStorageFileDetails, -) +from saturn_api.models.notification_subscribe import NotificationSubscribe as NotificationSubscribe +from saturn_api.models.notification_subscription import NotificationSubscription as NotificationSubscription +from saturn_api.models.notification_subscription_list import NotificationSubscriptionList as NotificationSubscriptionList +from saturn_api.models.notification_unsubscribe import NotificationUnsubscribe as NotificationUnsubscribe +from saturn_api.models.object_storage_bulk_delete_results import ObjectStorageBulkDeleteResults as ObjectStorageBulkDeleteResults +from saturn_api.models.object_storage_bulk_download import ObjectStorageBulkDownload as ObjectStorageBulkDownload +from saturn_api.models.object_storage_bulk_reference import ObjectStorageBulkReference as ObjectStorageBulkReference +from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart as ObjectStorageCompletePart +from saturn_api.models.object_storage_completed_upload import ObjectStorageCompletedUpload as ObjectStorageCompletedUpload +from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource as ObjectStorageCopySource +from saturn_api.models.object_storage_dir_details import ObjectStorageDirDetails as ObjectStorageDirDetails +from saturn_api.models.object_storage_file_details import ObjectStorageFileDetails as ObjectStorageFileDetails from saturn_api.models.object_storage_list import ObjectStorageList as ObjectStorageList -from saturn_api.models.object_storage_presigned_download import ( - ObjectStoragePresignedDownload as ObjectStoragePresignedDownload, -) -from saturn_api.models.object_storage_presigned_part import ( - ObjectStoragePresignedPart as ObjectStoragePresignedPart, -) -from saturn_api.models.object_storage_presigned_upload import ( - ObjectStoragePresignedUpload as ObjectStoragePresignedUpload, -) -from saturn_api.models.object_storage_reference import ( - ObjectStorageReference as ObjectStorageReference, -) -from saturn_api.models.object_storage_shared_owner import ( - ObjectStorageSharedOwner as ObjectStorageSharedOwner, -) -from saturn_api.models.object_storage_shared_owner_list import ( - ObjectStorageSharedOwnerList as ObjectStorageSharedOwnerList, -) -from saturn_api.models.object_storage_upload import ( - ObjectStorageUpload as ObjectStorageUpload, -) -from saturn_api.models.object_storage_upload_create import ( - ObjectStorageUploadCreate as ObjectStorageUploadCreate, -) -from saturn_api.models.object_storage_upload_list import ( - ObjectStorageUploadList as ObjectStorageUploadList, -) -from saturn_api.models.object_storage_usage_stats import ( - ObjectStorageUsageStats as ObjectStorageUsageStats, -) +from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload as ObjectStoragePresignedDownload +from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart as ObjectStoragePresignedPart +from saturn_api.models.object_storage_presigned_upload import ObjectStoragePresignedUpload as ObjectStoragePresignedUpload +from saturn_api.models.object_storage_reference import ObjectStorageReference as ObjectStorageReference +from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner as ObjectStorageSharedOwner +from saturn_api.models.object_storage_shared_owner_list import ObjectStorageSharedOwnerList as ObjectStorageSharedOwnerList +from saturn_api.models.object_storage_upload import ObjectStorageUpload as ObjectStorageUpload +from saturn_api.models.object_storage_upload_create import ObjectStorageUploadCreate as ObjectStorageUploadCreate +from saturn_api.models.object_storage_upload_list import ObjectStorageUploadList as ObjectStorageUploadList +from saturn_api.models.object_storage_usage_stats import ObjectStorageUsageStats as ObjectStorageUsageStats from saturn_api.models.org import Org as Org from saturn_api.models.org_create import OrgCreate as OrgCreate from saturn_api.models.org_invitation import OrgInvitation as OrgInvitation -from saturn_api.models.org_invitation_create import ( - OrgInvitationCreate as OrgInvitationCreate, -) +from saturn_api.models.org_invitation_create import OrgInvitationCreate as OrgInvitationCreate from saturn_api.models.org_invitation_list import OrgInvitationList as OrgInvitationList -from saturn_api.models.org_invitation_update import ( - OrgInvitationUpdate as OrgInvitationUpdate, -) +from saturn_api.models.org_invitation_update import OrgInvitationUpdate as OrgInvitationUpdate from saturn_api.models.org_list import OrgList as OrgList from saturn_api.models.org_member_create import OrgMemberCreate as OrgMemberCreate from saturn_api.models.org_member_update import OrgMemberUpdate as OrgMemberUpdate from saturn_api.models.org_update import OrgUpdate as OrgUpdate -from saturn_api.models.orgs_list_owners200_response import ( - OrgsListOwners200Response as OrgsListOwners200Response, -) +from saturn_api.models.orgs_list_owners200_response import OrgsListOwners200Response as OrgsListOwners200Response from saturn_api.models.owner import Owner as Owner from saturn_api.models.owner_by_id import OwnerById as OwnerById -from saturn_api.models.owner_by_identity_id import ( - OwnerByIdentityId as OwnerByIdentityId, -) +from saturn_api.models.owner_by_identity_id import OwnerByIdentityId as OwnerByIdentityId from saturn_api.models.owner_by_name import OwnerByName as OwnerByName from saturn_api.models.owner_detailed import OwnerDetailed as OwnerDetailed from saturn_api.models.owner_detailed_list import OwnerDetailedList as OwnerDetailedList @@ -686,141 +572,76 @@ from saturn_api.models.pod_history import PodHistory as PodHistory from saturn_api.models.pod_logs import PodLogs as PodLogs from saturn_api.models.pod_runtime_summary import PodRuntimeSummary as PodRuntimeSummary -from saturn_api.models.pod_runtime_summary_list import ( - PodRuntimeSummaryList as PodRuntimeSummaryList, -) +from saturn_api.models.pod_runtime_summary_list import PodRuntimeSummaryList as PodRuntimeSummaryList from saturn_api.models.pod_status import PodStatus as PodStatus from saturn_api.models.recipe import Recipe as Recipe from saturn_api.models.recipe_list import RecipeList as RecipeList from saturn_api.models.resource import Resource as Resource -from saturn_api.models.resource_by_deployment_id import ( - ResourceByDeploymentId as ResourceByDeploymentId, -) +from saturn_api.models.resource_by_deployment_id import ResourceByDeploymentId as ResourceByDeploymentId from saturn_api.models.resource_by_job_id import ResourceByJobId as ResourceByJobId -from saturn_api.models.resource_by_workspace_id import ( - ResourceByWorkspaceId as ResourceByWorkspaceId, -) +from saturn_api.models.resource_by_workspace_id import ResourceByWorkspaceId as ResourceByWorkspaceId from saturn_api.models.resource_clusters import ResourceClusters as ResourceClusters from saturn_api.models.resource_history import ResourceHistory as ResourceHistory from saturn_api.models.resource_recipe import ResourceRecipe as ResourceRecipe from saturn_api.models.resource_reference import ResourceReference as ResourceReference from saturn_api.models.resource_state import ResourceState as ResourceState from saturn_api.models.resource_template import ResourceTemplate as ResourceTemplate -from saturn_api.models.resource_template_access_level import ( - ResourceTemplateAccessLevel as ResourceTemplateAccessLevel, -) +from saturn_api.models.resource_template_access_level import ResourceTemplateAccessLevel as ResourceTemplateAccessLevel from saturn_api.models.resource_token_info import ResourceTokenInfo as ResourceTokenInfo -from saturn_api.models.resource_token_update import ( - ResourceTokenUpdate as ResourceTokenUpdate, -) +from saturn_api.models.resource_token_update import ResourceTokenUpdate as ResourceTokenUpdate from saturn_api.models.resource_type import ResourceType as ResourceType from saturn_api.models.restart_policy import RestartPolicy as RestartPolicy from saturn_api.models.route import Route as Route -from saturn_api.models.route_by_container_port import ( - RouteByContainerPort as RouteByContainerPort, -) +from saturn_api.models.route_by_container_port import RouteByContainerPort as RouteByContainerPort from saturn_api.models.route_by_id import RouteById as RouteById from saturn_api.models.route_by_subdomain import RouteBySubdomain as RouteBySubdomain from saturn_api.models.route_create import RouteCreate as RouteCreate from saturn_api.models.route_list import RouteList as RouteList from saturn_api.models.route_reference import RouteReference as RouteReference +from saturn_api.models.route_state import RouteState as RouteState from saturn_api.models.route_update import RouteUpdate as RouteUpdate +from saturn_api.models.ssh_private_key import SSHPrivateKey as SSHPrivateKey +from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate as SSHPrivateKeyCreate +from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList as SSHPrivateKeyList +from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial as SSHPrivateKeyPartial +from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate as SSHPrivateKeyUpdate +from saturn_api.models.ssh_public_key import SSHPublicKey as SSHPublicKey +from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate as SSHPublicKeyCreate +from saturn_api.models.ssh_public_key_list import SSHPublicKeyList as SSHPublicKeyList +from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate as SSHPublicKeyUpdate from saturn_api.models.secret import Secret as Secret from saturn_api.models.secret_access_level import SecretAccessLevel as SecretAccessLevel from saturn_api.models.secret_attachment import SecretAttachment as SecretAttachment -from saturn_api.models.secret_attachment_create import ( - SecretAttachmentCreate as SecretAttachmentCreate, -) -from saturn_api.models.secret_attachment_list import ( - SecretAttachmentList as SecretAttachmentList, -) -from saturn_api.models.secret_attachment_recipe import ( - SecretAttachmentRecipe as SecretAttachmentRecipe, -) -from saturn_api.models.secret_attachment_type import ( - SecretAttachmentType as SecretAttachmentType, -) -from saturn_api.models.secret_attachment_update import ( - SecretAttachmentUpdate as SecretAttachmentUpdate, -) +from saturn_api.models.secret_attachment_create import SecretAttachmentCreate as SecretAttachmentCreate +from saturn_api.models.secret_attachment_list import SecretAttachmentList as SecretAttachmentList +from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe as SecretAttachmentRecipe +from saturn_api.models.secret_attachment_type import SecretAttachmentType as SecretAttachmentType +from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate as SecretAttachmentUpdate from saturn_api.models.secret_create import SecretCreate as SecretCreate from saturn_api.models.secret_list import SecretList as SecretList from saturn_api.models.secret_update import SecretUpdate as SecretUpdate from saturn_api.models.server_options import ServerOptions as ServerOptions from saturn_api.models.server_options_size import ServerOptionsSize as ServerOptionsSize from saturn_api.models.service_account import ServiceAccount as ServiceAccount -from saturn_api.models.service_account_attachment import ( - ServiceAccountAttachment as ServiceAccountAttachment, -) -from saturn_api.models.service_account_create import ( - ServiceAccountCreate as ServiceAccountCreate, -) -from saturn_api.models.service_account_create_attachment import ( - ServiceAccountCreateAttachment as ServiceAccountCreateAttachment, -) -from saturn_api.models.service_account_entitlement import ( - ServiceAccountEntitlement as ServiceAccountEntitlement, -) -from saturn_api.models.service_account_entitlement_create import ( - ServiceAccountEntitlementCreate as ServiceAccountEntitlementCreate, -) -from saturn_api.models.service_account_entitlement_list import ( - ServiceAccountEntitlementList as ServiceAccountEntitlementList, -) -from saturn_api.models.service_account_list import ( - ServiceAccountList as ServiceAccountList, -) -from saturn_api.models.service_account_update import ( - ServiceAccountUpdate as ServiceAccountUpdate, -) +from saturn_api.models.service_account_attachment import ServiceAccountAttachment as ServiceAccountAttachment +from saturn_api.models.service_account_create import ServiceAccountCreate as ServiceAccountCreate +from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment as ServiceAccountCreateAttachment +from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement as ServiceAccountEntitlement +from saturn_api.models.service_account_entitlement_create import ServiceAccountEntitlementCreate as ServiceAccountEntitlementCreate +from saturn_api.models.service_account_entitlement_list import ServiceAccountEntitlementList as ServiceAccountEntitlementList +from saturn_api.models.service_account_list import ServiceAccountList as ServiceAccountList +from saturn_api.models.service_account_update import ServiceAccountUpdate as ServiceAccountUpdate from saturn_api.models.shared_access_mode import SharedAccessMode as SharedAccessMode from saturn_api.models.shared_folder import SharedFolder as SharedFolder -from saturn_api.models.shared_folder_access_level import ( - SharedFolderAccessLevel as SharedFolderAccessLevel, -) -from saturn_api.models.shared_folder_attachment import ( - SharedFolderAttachment as SharedFolderAttachment, -) -from saturn_api.models.shared_folder_attachment_create import ( - SharedFolderAttachmentCreate as SharedFolderAttachmentCreate, -) -from saturn_api.models.shared_folder_attachment_list import ( - SharedFolderAttachmentList as SharedFolderAttachmentList, -) -from saturn_api.models.shared_folder_attachment_recipe import ( - SharedFolderAttachmentRecipe as SharedFolderAttachmentRecipe, -) -from saturn_api.models.shared_folder_attachment_update import ( - SharedFolderAttachmentUpdate as SharedFolderAttachmentUpdate, -) -from saturn_api.models.shared_folder_create import ( - SharedFolderCreate as SharedFolderCreate, -) +from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel as SharedFolderAccessLevel +from saturn_api.models.shared_folder_attachment import SharedFolderAttachment as SharedFolderAttachment +from saturn_api.models.shared_folder_attachment_create import SharedFolderAttachmentCreate as SharedFolderAttachmentCreate +from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList as SharedFolderAttachmentList +from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe as SharedFolderAttachmentRecipe +from saturn_api.models.shared_folder_attachment_update import SharedFolderAttachmentUpdate as SharedFolderAttachmentUpdate +from saturn_api.models.shared_folder_create import SharedFolderCreate as SharedFolderCreate from saturn_api.models.shared_folder_list import SharedFolderList as SharedFolderList -from saturn_api.models.shared_folder_update import ( - SharedFolderUpdate as SharedFolderUpdate, -) -from saturn_api.models.ssh_private_key import SSHPrivateKey as SSHPrivateKey -from saturn_api.models.ssh_private_key_create import ( - SSHPrivateKeyCreate as SSHPrivateKeyCreate, -) -from saturn_api.models.ssh_private_key_list import ( - SSHPrivateKeyList as SSHPrivateKeyList, -) -from saturn_api.models.ssh_private_key_partial import ( - SSHPrivateKeyPartial as SSHPrivateKeyPartial, -) -from saturn_api.models.ssh_private_key_update import ( - SSHPrivateKeyUpdate as SSHPrivateKeyUpdate, -) -from saturn_api.models.ssh_public_key import SSHPublicKey as SSHPublicKey -from saturn_api.models.ssh_public_key_create import ( - SSHPublicKeyCreate as SSHPublicKeyCreate, -) -from saturn_api.models.ssh_public_key_list import SSHPublicKeyList as SSHPublicKeyList -from saturn_api.models.ssh_public_key_update import ( - SSHPublicKeyUpdate as SSHPublicKeyUpdate, -) +from saturn_api.models.shared_folder_update import SharedFolderUpdate as SharedFolderUpdate from saturn_api.models.stats import Stats as Stats from saturn_api.models.usage_limits import UsageLimits as UsageLimits from saturn_api.models.usage_limits_create import UsageLimitsCreate as UsageLimitsCreate @@ -834,43 +655,26 @@ from saturn_api.models.user_list import UserList as UserList from saturn_api.models.user_owner_list import UserOwnerList as UserOwnerList from saturn_api.models.user_preferences import UserPreferences as UserPreferences -from saturn_api.models.user_preferences_update import ( - UserPreferencesUpdate as UserPreferencesUpdate, -) +from saturn_api.models.user_preferences_update import UserPreferencesUpdate as UserPreferencesUpdate from saturn_api.models.user_update import UserUpdate as UserUpdate -from saturn_api.models.users_get200_response import ( - UsersGet200Response as UsersGet200Response, -) -from saturn_api.models.users_list200_response import ( - UsersList200Response as UsersList200Response, -) +from saturn_api.models.users_get200_response import UsersGet200Response as UsersGet200Response +from saturn_api.models.users_list200_response import UsersList200Response as UsersList200Response from saturn_api.models.viewer import Viewer as Viewer from saturn_api.models.viewer_create import ViewerCreate as ViewerCreate from saturn_api.models.viewer_list import ViewerList as ViewerList from saturn_api.models.viewer_recipe import ViewerRecipe as ViewerRecipe -from saturn_api.models.white_label_configuration import ( - WhiteLabelConfiguration as WhiteLabelConfiguration, -) +from saturn_api.models.white_label_configuration import WhiteLabelConfiguration as WhiteLabelConfiguration from saturn_api.models.workload_type import WorkloadType as WorkloadType from saturn_api.models.workspace import Workspace as Workspace from saturn_api.models.workspace_create import WorkspaceCreate as WorkspaceCreate -from saturn_api.models.workspace_ide_default_images import ( - WorkspaceIdeDefaultImages as WorkspaceIdeDefaultImages, -) +from saturn_api.models.workspace_ide_default_images import WorkspaceIdeDefaultImages as WorkspaceIdeDefaultImages from saturn_api.models.workspace_list import WorkspaceList as WorkspaceList from saturn_api.models.workspace_recipe import WorkspaceRecipe as WorkspaceRecipe -from saturn_api.models.workspace_route_recipe import ( - WorkspaceRouteRecipe as WorkspaceRouteRecipe, -) -from saturn_api.models.workspace_runtime_summary import ( - WorkspaceRuntimeSummary as WorkspaceRuntimeSummary, -) -from saturn_api.models.workspace_server_info import ( - WorkspaceServerInfo as WorkspaceServerInfo, -) -from saturn_api.models.workspace_server_options import ( - WorkspaceServerOptions as WorkspaceServerOptions, -) +from saturn_api.models.workspace_route_recipe import WorkspaceRouteRecipe as WorkspaceRouteRecipe +from saturn_api.models.workspace_runtime_summary import WorkspaceRuntimeSummary as WorkspaceRuntimeSummary +from saturn_api.models.workspace_server_info import WorkspaceServerInfo as WorkspaceServerInfo +from saturn_api.models.workspace_server_options import WorkspaceServerOptions as WorkspaceServerOptions from saturn_api.models.workspace_spec import WorkspaceSpec as WorkspaceSpec from saturn_api.models.workspace_start import WorkspaceStart as WorkspaceStart from saturn_api.models.workspace_update import WorkspaceUpdate as WorkspaceUpdate + diff --git a/saturn_api/api/__init__.py b/saturn_api/api/__init__.py index 74a63a4..2032ee9 100644 --- a/saturn_api/api/__init__.py +++ b/saturn_api/api/__init__.py @@ -5,6 +5,7 @@ from saturn_api.api.api_status_api import ApiStatusApi from saturn_api.api.api_tokens_api import ApiTokensApi from saturn_api.api.authorization_api import AuthorizationApi +from saturn_api.api.clusters_api import ClustersApi from saturn_api.api.current_user_api import CurrentUserApi from saturn_api.api.dask_clusters_api import DaskClustersApi from saturn_api.api.deployments_api import DeploymentsApi @@ -22,9 +23,7 @@ from saturn_api.api.orgs_api import OrgsApi from saturn_api.api.recipes_api import RecipesApi from saturn_api.api.secrets_api import SecretsApi -from saturn_api.api.service_account_entitlements_api import ( - ServiceAccountEntitlementsApi, -) +from saturn_api.api.service_account_entitlements_api import ServiceAccountEntitlementsApi from saturn_api.api.service_accounts_api import ServiceAccountsApi from saturn_api.api.shared_folder_attachments_api import SharedFolderAttachmentsApi from saturn_api.api.shared_folders_api import SharedFoldersApi @@ -32,3 +31,4 @@ from saturn_api.api.ssh_public_keys_api import SshPublicKeysApi from saturn_api.api.users_api import UsersApi from saturn_api.api.workspaces_api import WorkspacesApi + diff --git a/saturn_api/api/active_api.py b/saturn_api/api/active_api.py index ba4f742..586c098 100644 --- a/saturn_api/api/active_api.py +++ b/saturn_api/api/active_api.py @@ -1,37 +1,32 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.active_resource_list import ActiveResourceList from saturn_api.models.pod_logs import PodLogs from saturn_api.models.pod_runtime_summary import PodRuntimeSummary from saturn_api.models.pod_runtime_summary_list import PodRuntimeSummaryList from saturn_api.models.resource_type import ResourceType from saturn_api.models.workload_type import WorkloadType + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -47,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_pod( self, @@ -55,7 +51,10 @@ async def get_pod( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,7 +88,7 @@ async def get_pod( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_serialize( name=name, @@ -97,19 +96,23 @@ async def get_pod( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummary", + '200': "PodRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_pod_with_http_info( self, @@ -118,7 +121,10 @@ async def get_pod_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,7 +158,7 @@ async def get_pod_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_serialize( name=name, @@ -160,19 +166,23 @@ async def get_pod_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummary", + '200': "PodRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_pod_without_preload_content( self, @@ -181,7 +191,10 @@ async def get_pod_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -215,7 +228,7 @@ async def get_pod_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_serialize( name=name, @@ -223,15 +236,19 @@ async def get_pod_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummary", + '200': "PodRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_pod_serialize( self, name, @@ -244,37 +261,48 @@ def _get_pod_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if name is not None: - _path_params["name"] = name + _path_params['name'] = name # process the query parameters if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/active/pods/{name}", + method='GET', + resource_path='/api/active/pods/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -284,36 +312,27 @@ def _get_pod_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_pod_logs( self, name: StrictStr, - container_name: Annotated[ - Optional[StrictStr], - Field( - description="Name of the container to retrieve logs for. Defaults to first container in the pod." - ), - ] = None, - previous: Annotated[ - Optional[StrictBool], - Field( - description="Retrieve logs for the previous instance of a container, if it exists." - ), - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster where the pod is running.") - ] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], - Field(description="Number of log lines to retrieve."), - ] = None, + container_name: Annotated[Optional[StrictStr], Field(description="Name of the container to retrieve logs for. Defaults to first container in the pod.")] = None, + previous: Annotated[Optional[StrictBool], Field(description="Retrieve logs for the previous instance of a container, if it exists.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster where the pod is running.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Number of log lines to retrieve.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -353,7 +372,7 @@ async def get_pod_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_logs_serialize( name=name, @@ -364,46 +383,38 @@ async def get_pod_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodLogs", + '200': "PodLogs", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_pod_logs_with_http_info( self, name: StrictStr, - container_name: Annotated[ - Optional[StrictStr], - Field( - description="Name of the container to retrieve logs for. Defaults to first container in the pod." - ), - ] = None, - previous: Annotated[ - Optional[StrictBool], - Field( - description="Retrieve logs for the previous instance of a container, if it exists." - ), - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster where the pod is running.") - ] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], - Field(description="Number of log lines to retrieve."), - ] = None, + container_name: Annotated[Optional[StrictStr], Field(description="Name of the container to retrieve logs for. Defaults to first container in the pod.")] = None, + previous: Annotated[Optional[StrictBool], Field(description="Retrieve logs for the previous instance of a container, if it exists.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster where the pod is running.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Number of log lines to retrieve.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -443,7 +454,7 @@ async def get_pod_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_logs_serialize( name=name, @@ -454,46 +465,38 @@ async def get_pod_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodLogs", + '200': "PodLogs", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_pod_logs_without_preload_content( self, name: StrictStr, - container_name: Annotated[ - Optional[StrictStr], - Field( - description="Name of the container to retrieve logs for. Defaults to first container in the pod." - ), - ] = None, - previous: Annotated[ - Optional[StrictBool], - Field( - description="Retrieve logs for the previous instance of a container, if it exists." - ), - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster where the pod is running.") - ] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], - Field(description="Number of log lines to retrieve."), - ] = None, + container_name: Annotated[Optional[StrictStr], Field(description="Name of the container to retrieve logs for. Defaults to first container in the pod.")] = None, + previous: Annotated[Optional[StrictBool], Field(description="Retrieve logs for the previous instance of a container, if it exists.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster where the pod is running.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Number of log lines to retrieve.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -533,7 +536,7 @@ async def get_pod_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_logs_serialize( name=name, @@ -544,15 +547,19 @@ async def get_pod_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodLogs", + '200': "PodLogs", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_pod_logs_serialize( self, name, @@ -568,49 +575,60 @@ def _get_pod_logs_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if name is not None: - _path_params["name"] = name + _path_params['name'] = name # process the query parameters if container_name is not None: - - _query_params.append(("container_name", container_name)) - + + _query_params.append(('container_name', container_name)) + if previous is not None: - - _query_params.append(("previous", previous)) - + + _query_params.append(('previous', previous)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/active/pods/{name}/logs", + method='GET', + resource_path='/api/active/pods/{name}/logs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -620,27 +638,28 @@ def _get_pod_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_pods( self, workload_type: Annotated[WorkloadType, Field(description="Type of pods to query.")], workload_id: Annotated[StrictStr, Field(description="ID of the workload.")], - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster to query.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster to query.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -682,7 +701,7 @@ async def list_pods( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_pods_serialize( workload_type=workload_type, @@ -694,37 +713,39 @@ async def list_pods( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummaryList", + '200': "PodRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_pods_with_http_info( self, workload_type: Annotated[WorkloadType, Field(description="Type of pods to query.")], workload_id: Annotated[StrictStr, Field(description="ID of the workload.")], - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster to query.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster to query.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -766,7 +787,7 @@ async def list_pods_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_pods_serialize( workload_type=workload_type, @@ -778,37 +799,39 @@ async def list_pods_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummaryList", + '200': "PodRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_pods_without_preload_content( self, workload_type: Annotated[WorkloadType, Field(description="Type of pods to query.")], workload_id: Annotated[StrictStr, Field(description="ID of the workload.")], - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster to query.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster to query.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -850,7 +873,7 @@ async def list_pods_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_pods_serialize( workload_type=workload_type, @@ -862,15 +885,19 @@ async def list_pods_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummaryList", + '200': "PodRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_pods_serialize( self, workload_type, @@ -887,55 +914,66 @@ def _list_pods_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if workload_type is not None: - - _query_params.append(("workload_type", workload_type.value)) - + + _query_params.append(('workload_type', workload_type.value)) + if workload_id is not None: - - _query_params.append(("workload_id", workload_id)) - + + _query_params.append(('workload_id', workload_id)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/active/pods", + method='GET', + resource_path='/api/active/pods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -945,40 +983,30 @@ def _list_pods_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_resources( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - resource_type: Annotated[ - Optional[ResourceType], Field(description="Filter the type of returned resources.") - ] = None, - list_by: Annotated[ - Optional[StrictStr], - Field( - description="List active resources at the owner, org, or account level. Org and Account require elevated permissions." - ), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + resource_type: Annotated[Optional[ResourceType], Field(description="Filter the type of returned resources.")] = None, + list_by: Annotated[Optional[StrictStr], Field(description="List active resources at the owner, org, or account level. Org and Account require elevated permissions.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1024,7 +1052,7 @@ async def list_resources( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_resources_serialize( user_id=user_id, @@ -1038,50 +1066,41 @@ async def list_resources( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActiveResourceList", + '200': "ActiveResourceList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_resources_with_http_info( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - resource_type: Annotated[ - Optional[ResourceType], Field(description="Filter the type of returned resources.") - ] = None, - list_by: Annotated[ - Optional[StrictStr], - Field( - description="List active resources at the owner, org, or account level. Org and Account require elevated permissions." - ), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + resource_type: Annotated[Optional[ResourceType], Field(description="Filter the type of returned resources.")] = None, + list_by: Annotated[Optional[StrictStr], Field(description="List active resources at the owner, org, or account level. Org and Account require elevated permissions.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1127,7 +1146,7 @@ async def list_resources_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_resources_serialize( user_id=user_id, @@ -1141,50 +1160,41 @@ async def list_resources_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActiveResourceList", + '200': "ActiveResourceList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_resources_without_preload_content( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - resource_type: Annotated[ - Optional[ResourceType], Field(description="Filter the type of returned resources.") - ] = None, - list_by: Annotated[ - Optional[StrictStr], - Field( - description="List active resources at the owner, org, or account level. Org and Account require elevated permissions." - ), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + resource_type: Annotated[Optional[ResourceType], Field(description="Filter the type of returned resources.")] = None, + list_by: Annotated[Optional[StrictStr], Field(description="List active resources at the owner, org, or account level. Org and Account require elevated permissions.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1230,7 +1240,7 @@ async def list_resources_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_resources_serialize( user_id=user_id, @@ -1244,15 +1254,19 @@ async def list_resources_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActiveResourceList", + '200': "ActiveResourceList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_resources_serialize( self, user_id, @@ -1271,63 +1285,74 @@ def _list_resources_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if resource_type is not None: - - _query_params.append(("resource_type", resource_type.value)) - + + _query_params.append(('resource_type', resource_type.value)) + if list_by is not None: - - _query_params.append(("list_by", list_by)) - + + _query_params.append(('list_by', list_by)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/active/resources", + method='GET', + resource_path='/api/active/resources', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1337,5 +1362,7 @@ def _list_resources_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/api_status_api.py b/saturn_api/api/api_status_api.py index 2c02ec5..79a140a 100644 --- a/saturn_api/api/api_status_api.py +++ b/saturn_api/api/api_status_api.py @@ -1,24 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from saturn_api.models.api_status import ApiStatus + from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse -from saturn_api.models.api_status import ApiStatus from saturn_api.rest import RESTResponseType @@ -34,13 +34,17 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -70,32 +74,39 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiStatus", + '200': "ApiStatus", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -125,32 +136,39 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiStatus", + '200': "ApiStatus", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -180,21 +198,25 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiStatus", + '200': "ApiStatus", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, _request_auth, @@ -205,13 +227,16 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -220,16 +245,24 @@ def _get_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/status", + method='GET', + resource_path='/api/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -239,5 +272,7 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/api_tokens_api.py b/saturn_api/api/api_tokens_api.py index cae4ff9..ee9e2db 100644 --- a/saturn_api/api/api_tokens_api.py +++ b/saturn_api/api/api_tokens_api.py @@ -1,36 +1,31 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.api_token import ApiToken from saturn_api.models.api_token_create import ApiTokenCreate from saturn_api.models.api_token_info import ApiTokenInfo from saturn_api.models.api_token_list import ApiTokenList from saturn_api.models.api_token_update import ApiTokenUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -46,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -53,7 +49,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -86,26 +85,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( api_token_create=api_token_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ApiToken", + '201': "ApiToken", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -113,7 +116,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,26 +152,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( api_token_create=api_token_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ApiToken", + '201': "ApiToken", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -173,7 +183,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -206,22 +219,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( api_token_create=api_token_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ApiToken", + '201': "ApiToken", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, api_token_create, @@ -233,13 +250,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -250,24 +270,37 @@ def _create_serialize( if api_token_create is not None: _body_params = api_token_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/tokens", + method='POST', + resource_path='/api/tokens', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -277,9 +310,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -287,7 +323,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -320,26 +359,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -347,7 +390,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -380,26 +426,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -407,7 +457,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -440,22 +493,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, api_token_id, @@ -467,29 +524,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if api_token_id is not None: - _path_params["api_token_id"] = api_token_id + _path_params['api_token_id'] = api_token_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/tokens/{api_token_id}", + method='DELETE', + resource_path='/api/tokens/{api_token_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -499,9 +564,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -509,7 +577,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -542,26 +613,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenInfo", + '200': "ApiTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -569,7 +644,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -602,26 +680,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenInfo", + '200': "ApiTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -629,7 +711,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -662,22 +747,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenInfo", + '200': "ApiTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, api_token_id, @@ -689,33 +778,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if api_token_id is not None: - _path_params["api_token_id"] = api_token_id + _path_params['api_token_id'] = api_token_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/tokens/{api_token_id}", + method='GET', + resource_path='/api/tokens/{api_token_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -725,35 +825,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -798,7 +892,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -811,45 +905,40 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenList", + '200': "ApiTokenList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -894,7 +983,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -907,45 +996,40 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenList", + '200': "ApiTokenList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -990,7 +1074,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1003,15 +1087,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenList", + '200': "ApiTokenList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, user_id, @@ -1029,59 +1117,70 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if identity is not None: - - _query_params.append(("identity", identity)) - + + _query_params.append(('identity', identity)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/tokens", + method='GET', + resource_path='/api/tokens', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1091,9 +1190,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1102,7 +1204,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1137,7 +1242,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( api_token_id=api_token_id, @@ -1145,19 +1250,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenInfo", + '200': "ApiTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1166,7 +1275,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1201,7 +1313,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( api_token_id=api_token_id, @@ -1209,19 +1321,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenInfo", + '200': "ApiTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1230,7 +1346,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1265,7 +1384,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( api_token_id=api_token_id, @@ -1273,15 +1392,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ApiTokenInfo", + '200': "ApiTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, api_token_id, @@ -1294,18 +1417,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if api_token_id is not None: - _path_params["api_token_id"] = api_token_id + _path_params['api_token_id'] = api_token_id # process the query parameters # process the header parameters # process the form parameters @@ -1313,24 +1439,37 @@ def _update_serialize( if api_token_update is not None: _body_params = api_token_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/tokens/{api_token_id}", + method='PATCH', + resource_path='/api/tokens/{api_token_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1340,5 +1479,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/authorization_api.py b/saturn_api/api/authorization_api.py index bee9979..6f77a2d 100644 --- a/saturn_api/api/authorization_api.py +++ b/saturn_api/api/authorization_api.py @@ -1,33 +1,29 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.authorization_grant import AuthorizationGrant from saturn_api.models.authorization_token_response import AuthorizationTokenResponse from saturn_api.models.login import Login + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -43,6 +39,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_oauth_token( self, @@ -50,7 +47,10 @@ async def create_oauth_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,26 +83,30 @@ async def create_oauth_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_oauth_token_serialize( authorization_grant=authorization_grant, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AuthorizationTokenResponse", + '200': "AuthorizationTokenResponse", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_oauth_token_with_http_info( self, @@ -110,7 +114,10 @@ async def create_oauth_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -143,26 +150,30 @@ async def create_oauth_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_oauth_token_serialize( authorization_grant=authorization_grant, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AuthorizationTokenResponse", + '200': "AuthorizationTokenResponse", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_oauth_token_without_preload_content( self, @@ -170,7 +181,10 @@ async def create_oauth_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -203,22 +217,26 @@ async def create_oauth_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_oauth_token_serialize( authorization_grant=authorization_grant, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AuthorizationTokenResponse", + '200': "AuthorizationTokenResponse", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_oauth_token_serialize( self, authorization_grant, @@ -230,13 +248,16 @@ def _create_oauth_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -247,24 +268,37 @@ def _create_oauth_token_serialize( if authorization_grant is not None: _body_params = authorization_grant + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/auth/token", + method='POST', + resource_path='/api/auth/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -274,30 +308,28 @@ def _create_oauth_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_oauth_init( self, - response_type: Annotated[ - StrictStr, Field(description="OAuth response type. Only 'code' is supported.") - ], + response_type: Annotated[StrictStr, Field(description="OAuth response type. Only 'code' is supported.")], client_id: Annotated[StrictStr, Field(description="Saturn OAuth client ID")], code_challenge: Annotated[StrictStr, Field(description="OAuth code challenge.")], - redirect_uri: Annotated[ - StrictStr, Field(description="URI for redirect with code challenge response.") - ], - code_challenge_method: Annotated[ - Optional[StrictStr], Field(description="OAuth code challenge method.") - ] = None, - state: Annotated[ - Optional[StrictStr], Field(description="OAuth code challenge state.") - ] = None, + redirect_uri: Annotated[StrictStr, Field(description="URI for redirect with code challenge response.")], + code_challenge_method: Annotated[Optional[StrictStr], Field(description="OAuth code challenge method.")] = None, + state: Annotated[Optional[StrictStr], Field(description="OAuth code challenge state.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,7 +372,7 @@ async def get_oauth_init( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_oauth_init_serialize( response_type=response_type, @@ -352,40 +384,39 @@ async def get_oauth_init( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "302": None, + '302': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_oauth_init_with_http_info( self, - response_type: Annotated[ - StrictStr, Field(description="OAuth response type. Only 'code' is supported.") - ], + response_type: Annotated[StrictStr, Field(description="OAuth response type. Only 'code' is supported.")], client_id: Annotated[StrictStr, Field(description="Saturn OAuth client ID")], code_challenge: Annotated[StrictStr, Field(description="OAuth code challenge.")], - redirect_uri: Annotated[ - StrictStr, Field(description="URI for redirect with code challenge response.") - ], - code_challenge_method: Annotated[ - Optional[StrictStr], Field(description="OAuth code challenge method.") - ] = None, - state: Annotated[ - Optional[StrictStr], Field(description="OAuth code challenge state.") - ] = None, + redirect_uri: Annotated[StrictStr, Field(description="URI for redirect with code challenge response.")], + code_challenge_method: Annotated[Optional[StrictStr], Field(description="OAuth code challenge method.")] = None, + state: Annotated[Optional[StrictStr], Field(description="OAuth code challenge state.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -428,7 +459,7 @@ async def get_oauth_init_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_oauth_init_serialize( response_type=response_type, @@ -440,40 +471,39 @@ async def get_oauth_init_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "302": None, + '302': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_oauth_init_without_preload_content( self, - response_type: Annotated[ - StrictStr, Field(description="OAuth response type. Only 'code' is supported.") - ], + response_type: Annotated[StrictStr, Field(description="OAuth response type. Only 'code' is supported.")], client_id: Annotated[StrictStr, Field(description="Saturn OAuth client ID")], code_challenge: Annotated[StrictStr, Field(description="OAuth code challenge.")], - redirect_uri: Annotated[ - StrictStr, Field(description="URI for redirect with code challenge response.") - ], - code_challenge_method: Annotated[ - Optional[StrictStr], Field(description="OAuth code challenge method.") - ] = None, - state: Annotated[ - Optional[StrictStr], Field(description="OAuth code challenge state.") - ] = None, + redirect_uri: Annotated[StrictStr, Field(description="URI for redirect with code challenge response.")], + code_challenge_method: Annotated[Optional[StrictStr], Field(description="OAuth code challenge method.")] = None, + state: Annotated[Optional[StrictStr], Field(description="OAuth code challenge state.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -516,7 +546,7 @@ async def get_oauth_init_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_oauth_init_serialize( response_type=response_type, @@ -528,15 +558,19 @@ async def get_oauth_init_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "302": None, + '302': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_oauth_init_serialize( self, response_type, @@ -553,51 +587,59 @@ def _get_oauth_init_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if response_type is not None: - - _query_params.append(("response_type", response_type)) - + + _query_params.append(('response_type', response_type)) + if client_id is not None: - - _query_params.append(("client_id", client_id)) - + + _query_params.append(('client_id', client_id)) + if code_challenge is not None: - - _query_params.append(("code_challenge", code_challenge)) - + + _query_params.append(('code_challenge', code_challenge)) + if code_challenge_method is not None: - - _query_params.append(("code_challenge_method", code_challenge_method)) - + + _query_params.append(('code_challenge_method', code_challenge_method)) + if redirect_uri is not None: - - _query_params.append(("redirect_uri", redirect_uri)) - + + _query_params.append(('redirect_uri', redirect_uri)) + if state is not None: - - _query_params.append(("state", state)) - + + _query_params.append(('state', state)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/auth/token", + method='GET', + resource_path='/api/auth/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -607,9 +649,12 @@ def _get_oauth_init_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def login( self, @@ -617,7 +662,10 @@ async def login( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -650,26 +698,30 @@ async def login( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( login=login, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def login_with_http_info( self, @@ -677,7 +729,10 @@ async def login_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -710,26 +765,30 @@ async def login_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( login=login, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def login_without_preload_content( self, @@ -737,7 +796,10 @@ async def login_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -770,22 +832,26 @@ async def login_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( login=login, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _login_serialize( self, login, @@ -797,13 +863,16 @@ def _login_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -814,20 +883,30 @@ def _login_serialize( if login is not None: _body_params = login + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/auth/login", + method='POST', + resource_path='/api/auth/login', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -837,16 +916,22 @@ def _login_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def logout( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -877,32 +962,39 @@ async def logout( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "302": None, + '302': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def logout_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -933,32 +1025,39 @@ async def logout_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "302": None, + '302': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def logout_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -989,21 +1088,25 @@ async def logout_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "302": None, + '302': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _logout_serialize( self, _request_auth, @@ -1014,13 +1117,16 @@ def _logout_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1029,12 +1135,17 @@ def _logout_serialize( # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/auth/logout", + method='GET', + resource_path='/api/auth/logout', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1044,5 +1155,7 @@ def _logout_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/clusters_api.py b/saturn_api/api/clusters_api.py new file mode 100644 index 0000000..3a9b801 --- /dev/null +++ b/saturn_api/api/clusters_api.py @@ -0,0 +1,1467 @@ +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated +from saturn_api.models.cluster import Cluster +from saturn_api.models.cluster_create import ClusterCreate +from saturn_api.models.cluster_list import ClusterList +from saturn_api.models.cluster_update import ClusterUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse +from saturn_api.rest import RESTResponseType + + +class ClustersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create( + self, + cluster_create: ClusterCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Cluster: + """Create cluster + + Create a new cluster. + + :param cluster_create: (required) + :type cluster_create: ClusterCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + cluster_create=cluster_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_with_http_info( + self, + cluster_create: ClusterCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Cluster]: + """Create cluster + + Create a new cluster. + + :param cluster_create: (required) + :type cluster_create: ClusterCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + cluster_create=cluster_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_without_preload_content( + self, + cluster_create: ClusterCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create cluster + + Create a new cluster. + + :param cluster_create: (required) + :type cluster_create: ClusterCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + cluster_create=cluster_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_serialize( + self, + cluster_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if cluster_create is not None: + _body_params = cluster_create + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/clusters', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete( + self, + cluster_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete cluster + + Delete a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_with_http_info( + self, + cluster_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete cluster + + Delete a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_without_preload_content( + self, + cluster_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete cluster + + Delete a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_serialize( + self, + cluster_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cluster_id is not None: + _path_params['cluster_id'] = cluster_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/clusters/{cluster_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get( + self, + cluster_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Cluster: + """Get cluster + + Get a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_with_http_info( + self, + cluster_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Cluster]: + """Get cluster + + Get a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_without_preload_content( + self, + cluster_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get cluster + + Get a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_serialize( + self, + cluster_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cluster_id is not None: + _path_params['cluster_id'] = cluster_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/clusters/{cluster_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list( + self, + org_id: Annotated[Optional[StrictStr], Field(description="Filter clusters by org ID.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring search on cluster name.")] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClusterList: + """List clusters + + Paginated list of clusters. + + :param org_id: Filter clusters by org ID. + :type org_id: str + :param name: Substring search on cluster name. + :type name: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + name=name, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterList", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_with_http_info( + self, + org_id: Annotated[Optional[StrictStr], Field(description="Filter clusters by org ID.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring search on cluster name.")] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClusterList]: + """List clusters + + Paginated list of clusters. + + :param org_id: Filter clusters by org ID. + :type org_id: str + :param name: Substring search on cluster name. + :type name: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + name=name, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterList", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_without_preload_content( + self, + org_id: Annotated[Optional[StrictStr], Field(description="Filter clusters by org ID.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring search on cluster name.")] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List clusters + + Paginated list of clusters. + + :param org_id: Filter clusters by org ID. + :type org_id: str + :param name: Substring search on cluster name. + :type name: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + name=name, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterList", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_serialize( + self, + org_id, + name, + prev_key, + next_key, + page_size, + descending, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if org_id is not None: + + _query_params.append(('org_id', org_id)) + + if name is not None: + + _query_params.append(('name', name)) + + if prev_key is not None: + + _query_params.append(('prev_key', prev_key)) + + if next_key is not None: + + _query_params.append(('next_key', next_key)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if descending is not None: + + _query_params.append(('descending', descending)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/clusters', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update( + self, + cluster_id: StrictStr, + cluster_update: ClusterUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Cluster: + """Update cluster + + Update a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param cluster_update: (required) + :type cluster_update: ClusterUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + cluster_id=cluster_id, + cluster_update=cluster_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_with_http_info( + self, + cluster_id: StrictStr, + cluster_update: ClusterUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Cluster]: + """Update cluster + + Update a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param cluster_update: (required) + :type cluster_update: ClusterUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + cluster_id=cluster_id, + cluster_update=cluster_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_without_preload_content( + self, + cluster_id: StrictStr, + cluster_update: ClusterUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update cluster + + Update a cluster. + + :param cluster_id: (required) + :type cluster_id: str + :param cluster_update: (required) + :type cluster_update: ClusterUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + cluster_id=cluster_id, + cluster_update=cluster_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cluster", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_serialize( + self, + cluster_id, + cluster_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cluster_id is not None: + _path_params['cluster_id'] = cluster_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if cluster_update is not None: + _body_params = cluster_update + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/api/clusters/{cluster_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/saturn_api/api/current_user_api.py b/saturn_api/api/current_user_api.py index d6ace1b..776a4dc 100644 --- a/saturn_api/api/current_user_api.py +++ b/saturn_api/api/current_user_api.py @@ -1,30 +1,33 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.user_detailed import UserDetailed from saturn_api.models.user_owner_list import UserOwnerList from saturn_api.models.user_preferences import UserPreferences from saturn_api.models.user_preferences_update import UserPreferencesUpdate from saturn_api.models.user_update import UserUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,13 +43,253 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + + @validate_call + async def delete( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete current user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete current user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete current user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/user', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call async def get( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,33 +319,40 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", - "204": None, + '200': "UserDetailed", + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -132,33 +382,40 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", - "204": None, + '200': "UserDetailed", + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -188,22 +445,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", - "204": None, + '200': "UserDetailed", + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, _request_auth, @@ -214,13 +475,16 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -229,16 +493,24 @@ def _get_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/user", + method='GET', + resource_path='/api/user', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -248,9 +520,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_aggregated_usage( self, @@ -259,7 +534,10 @@ async def get_aggregated_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -294,7 +572,7 @@ async def get_aggregated_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( start=start, @@ -302,19 +580,23 @@ async def get_aggregated_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_aggregated_usage_with_http_info( self, @@ -323,7 +605,10 @@ async def get_aggregated_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,7 +643,7 @@ async def get_aggregated_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( start=start, @@ -366,19 +651,23 @@ async def get_aggregated_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_aggregated_usage_without_preload_content( self, @@ -387,7 +676,10 @@ async def get_aggregated_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -422,7 +714,7 @@ async def get_aggregated_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( start=start, @@ -430,15 +722,19 @@ async def get_aggregated_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_aggregated_usage_serialize( self, start, @@ -451,13 +747,16 @@ def _get_aggregated_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -465,33 +764,51 @@ def _get_aggregated_usage_serialize( if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/user/usage/aggregated", + method='GET', + resource_path='/api/user/usage/aggregated', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -501,16 +818,22 @@ def _get_aggregated_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_preferences( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -540,32 +863,39 @@ async def get_preferences( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_preferences_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserPreferences", + '200': "UserPreferences", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_preferences_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -595,32 +925,39 @@ async def get_preferences_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_preferences_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserPreferences", + '200': "UserPreferences", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_preferences_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -650,21 +987,25 @@ async def get_preferences_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_preferences_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserPreferences", + '200': "UserPreferences", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_preferences_serialize( self, _request_auth, @@ -675,13 +1016,16 @@ def _get_preferences_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -690,16 +1034,24 @@ def _get_preferences_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/user/preferences", + method='GET', + resource_path='/api/user/preferences', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -709,25 +1061,26 @@ def _get_preferences_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_owners( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -765,7 +1118,7 @@ async def list_owners( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( prev_key=prev_key, @@ -775,35 +1128,37 @@ async def list_owners( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserOwnerList", + '200': "UserOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_owners_with_http_info( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -841,7 +1196,7 @@ async def list_owners_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( prev_key=prev_key, @@ -851,35 +1206,37 @@ async def list_owners_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserOwnerList", + '200': "UserOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_owners_without_preload_content( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -917,7 +1274,7 @@ async def list_owners_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( prev_key=prev_key, @@ -927,15 +1284,19 @@ async def list_owners_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserOwnerList", + '200': "UserOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_owners_serialize( self, prev_key, @@ -950,47 +1311,58 @@ def _list_owners_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/user/owners", + method='GET', + resource_path='/api/user/owners', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1000,26 +1372,27 @@ def _list_owners_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_owners_0( self, user_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1059,7 +1432,7 @@ async def list_owners_0( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_0_serialize( user_id=user_id, @@ -1070,36 +1443,38 @@ async def list_owners_0( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserOwnerList", + '200': "UserOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_owners_0_with_http_info( self, user_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1139,7 +1514,7 @@ async def list_owners_0_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_0_serialize( user_id=user_id, @@ -1150,36 +1525,38 @@ async def list_owners_0_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserOwnerList", + '200': "UserOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_owners_0_without_preload_content( self, user_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1219,7 +1596,7 @@ async def list_owners_0_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_0_serialize( user_id=user_id, @@ -1230,15 +1607,19 @@ async def list_owners_0_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserOwnerList", + '200': "UserOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_owners_0_serialize( self, user_id, @@ -1254,49 +1635,60 @@ def _list_owners_0_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/users/{user_id}/owners", + method='GET', + resource_path='/api/users/{user_id}/owners', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1306,9 +1698,12 @@ def _list_owners_0_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1316,7 +1711,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1348,26 +1746,30 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_update=user_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", + '200': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1375,7 +1777,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1407,26 +1812,30 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_update=user_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", + '200': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1434,7 +1843,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1466,22 +1878,26 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_update=user_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", + '200': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, user_update, @@ -1493,13 +1909,16 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1510,24 +1929,37 @@ def _update_serialize( if user_update is not None: _body_params = user_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/user", + method='PATCH', + resource_path='/api/user', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1537,9 +1969,12 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_preferences( self, @@ -1547,7 +1982,10 @@ async def update_preferences( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1579,26 +2017,30 @@ async def update_preferences( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_preferences_serialize( user_preferences_update=user_preferences_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserPreferences", + '200': "UserPreferences", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_preferences_with_http_info( self, @@ -1606,7 +2048,10 @@ async def update_preferences_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1638,26 +2083,30 @@ async def update_preferences_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_preferences_serialize( user_preferences_update=user_preferences_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserPreferences", + '200': "UserPreferences", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_preferences_without_preload_content( self, @@ -1665,7 +2114,10 @@ async def update_preferences_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1697,22 +2149,26 @@ async def update_preferences_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_preferences_serialize( user_preferences_update=user_preferences_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserPreferences", + '200': "UserPreferences", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_preferences_serialize( self, user_preferences_update, @@ -1724,13 +2180,16 @@ def _update_preferences_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1741,24 +2200,37 @@ def _update_preferences_serialize( if user_preferences_update is not None: _body_params = user_preferences_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/user/preferences", + method='PATCH', + resource_path='/api/user/preferences', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1768,5 +2240,7 @@ def _update_preferences_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/dask_clusters_api.py b/saturn_api/api/dask_clusters_api.py index 8fa23ff..85f16c8 100644 --- a/saturn_api/api/dask_clusters_api.py +++ b/saturn_api/api/dask_clusters_api.py @@ -1,32 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Any, Dict, Optional +from typing_extensions import Annotated from saturn_api.models.dask_cluster import DaskCluster from saturn_api.models.dask_cluster_adapt import DaskClusterAdapt from saturn_api.models.dask_cluster_create import DaskClusterCreate @@ -36,9 +28,7 @@ from saturn_api.models.dask_cluster_server_options import DaskClusterServerOptions from saturn_api.models.dask_cluster_update import DaskClusterUpdate from saturn_api.models.dask_components import DaskComponents -from saturn_api.models.dask_worker_runtime_summary_list import ( - DaskWorkerRuntimeSummaryList, -) +from saturn_api.models.dask_worker_runtime_summary_list import DaskWorkerRuntimeSummaryList from saturn_api.models.deployment_runtime_summary import DeploymentRuntimeSummary from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.metrics import Metrics @@ -46,6 +36,9 @@ from saturn_api.models.resource_history import ResourceHistory from saturn_api.models.resource_token_info import ResourceTokenInfo from saturn_api.models.resource_token_update import ResourceTokenUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -61,6 +54,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def adapt( self, @@ -69,7 +63,10 @@ async def adapt( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -103,7 +100,7 @@ async def adapt( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._adapt_serialize( dask_cluster_id=dask_cluster_id, @@ -111,19 +108,23 @@ async def adapt( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def adapt_with_http_info( self, @@ -132,7 +133,10 @@ async def adapt_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -166,7 +170,7 @@ async def adapt_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._adapt_serialize( dask_cluster_id=dask_cluster_id, @@ -174,19 +178,23 @@ async def adapt_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def adapt_without_preload_content( self, @@ -195,7 +203,10 @@ async def adapt_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -229,7 +240,7 @@ async def adapt_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._adapt_serialize( dask_cluster_id=dask_cluster_id, @@ -237,15 +248,19 @@ async def adapt_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _adapt_serialize( self, dask_cluster_id, @@ -258,18 +273,21 @@ def _adapt_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -277,20 +295,30 @@ def _adapt_serialize( if dask_cluster_adapt is not None: _body_params = dask_cluster_adapt + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters/{dask_cluster_id}/adapt", + method='POST', + resource_path='/api/dask_clusters/{dask_cluster_id}/adapt', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -300,9 +328,12 @@ def _adapt_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create( self, @@ -310,7 +341,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -343,26 +377,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( dask_cluster_create=dask_cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "DaskCluster", + '201': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -370,7 +408,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -403,26 +444,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( dask_cluster_create=dask_cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "DaskCluster", + '201': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -430,7 +475,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -463,22 +511,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( dask_cluster_create=dask_cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "DaskCluster", + '201': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, dask_cluster_create, @@ -490,13 +542,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -507,24 +562,37 @@ def _create_serialize( if dask_cluster_create is not None: _body_params = dask_cluster_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters", + method='POST', + resource_path='/api/dask_clusters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -534,21 +602,24 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, dask_cluster_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete dask cluster that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete dask cluster that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -583,7 +654,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( dask_cluster_id=dask_cluster_id, @@ -591,31 +662,35 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, dask_cluster_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete dask cluster that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete dask cluster that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -650,7 +725,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( dask_cluster_id=dask_cluster_id, @@ -658,31 +733,35 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, dask_cluster_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete dask cluster that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete dask cluster that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -717,7 +796,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( dask_cluster_id=dask_cluster_id, @@ -725,15 +804,19 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, dask_cluster_id, @@ -746,33 +829,41 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters if allow_active is not None: - - _query_params.append(("allow_active", allow_active)) - + + _query_params.append(('allow_active', allow_active)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/dask_clusters/{dask_cluster_id}", + method='DELETE', + resource_path='/api/dask_clusters/{dask_cluster_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -782,9 +873,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -792,7 +886,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -825,26 +922,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -852,7 +953,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -885,26 +989,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -912,7 +1020,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -945,22 +1056,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, dask_cluster_id, @@ -972,33 +1087,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1008,9 +1134,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_info( self, @@ -1018,7 +1147,10 @@ async def get_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1050,26 +1182,30 @@ async def get_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_info_with_http_info( self, @@ -1077,7 +1213,10 @@ async def get_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1109,26 +1248,30 @@ async def get_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_info_without_preload_content( self, @@ -1136,7 +1279,10 @@ async def get_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1168,22 +1314,26 @@ async def get_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_info_serialize( self, dask_cluster_id, @@ -1195,33 +1345,44 @@ def _get_info_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/info", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1231,9 +1392,12 @@ def _get_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_kubecluster_runtime_summary( self, @@ -1241,7 +1405,10 @@ async def get_kubecluster_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1274,26 +1441,30 @@ async def get_kubecluster_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_kubecluster_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRuntimeSummary", + '200': "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_kubecluster_runtime_summary_with_http_info( self, @@ -1301,7 +1472,10 @@ async def get_kubecluster_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1334,26 +1508,30 @@ async def get_kubecluster_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_kubecluster_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRuntimeSummary", + '200': "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_kubecluster_runtime_summary_without_preload_content( self, @@ -1361,7 +1539,10 @@ async def get_kubecluster_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1394,22 +1575,26 @@ async def get_kubecluster_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_kubecluster_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRuntimeSummary", + '200': "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_kubecluster_runtime_summary_serialize( self, dask_cluster_id, @@ -1421,33 +1606,44 @@ def _get_kubecluster_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/kubecluster/runtimesummary", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/kubecluster/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1457,32 +1653,29 @@ def _get_kubecluster_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_logs( self, dask_cluster_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1527,7 +1720,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( dask_cluster_id=dask_cluster_id, @@ -1540,42 +1733,40 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_logs_with_http_info( self, dask_cluster_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1620,7 +1811,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( dask_cluster_id=dask_cluster_id, @@ -1633,42 +1824,40 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_logs_without_preload_content( self, dask_cluster_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1713,7 +1902,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( dask_cluster_id=dask_cluster_id, @@ -1726,15 +1915,19 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_logs_serialize( self, dask_cluster_id, @@ -1752,57 +1945,68 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters if pod_name is not None: - - _query_params.append(("pod_name", pod_name)) - + + _query_params.append(('pod_name', pod_name)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if component is not None: - - _query_params.append(("component", component.value)) - + + _query_params.append(('component', component.value)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/logs", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/logs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1812,35 +2016,29 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_metrics( self, dask_cluster_id: StrictStr, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1885,7 +2083,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( dask_cluster_id=dask_cluster_id, @@ -1898,45 +2096,40 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_metrics_with_http_info( self, dask_cluster_id: StrictStr, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1981,7 +2174,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( dask_cluster_id=dask_cluster_id, @@ -1994,45 +2187,40 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_metrics_without_preload_content( self, dask_cluster_id: StrictStr, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2077,7 +2265,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( dask_cluster_id=dask_cluster_id, @@ -2090,15 +2278,19 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_metrics_serialize( self, dask_cluster_id, @@ -2116,65 +2308,86 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters if component is not None: - - _query_params.append(("component", component.value)) - + + _query_params.append(('component', component.value)) + if type is not None: - - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if resolution is not None: - - _query_params.append(("resolution", resolution)) - + + _query_params.append(('resolution', resolution)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/metrics", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/metrics', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2184,20 +2397,24 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_pod_history( self, dask_cluster_id: StrictStr, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2232,7 +2449,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( dask_cluster_id=dask_cluster_id, @@ -2240,30 +2457,35 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_pod_history_with_http_info( self, dask_cluster_id: StrictStr, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2298,7 +2520,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( dask_cluster_id=dask_cluster_id, @@ -2306,30 +2528,35 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_pod_history_without_preload_content( self, dask_cluster_id: StrictStr, - component: Annotated[ - Optional[DaskComponents], Field(description="Dask component to query.") - ] = None, + component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2364,7 +2591,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( dask_cluster_id=dask_cluster_id, @@ -2372,15 +2599,19 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_pod_history_serialize( self, dask_cluster_id, @@ -2393,37 +2624,48 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters if component is not None: - - _query_params.append(("component", component.value)) - + + _query_params.append(('component', component.value)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/history", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2433,9 +2675,12 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_runtime_summary( self, @@ -2443,7 +2688,10 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2476,26 +2724,30 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterRuntimeSummary", + '200': "DaskClusterRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_runtime_summary_with_http_info( self, @@ -2503,7 +2755,10 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2536,26 +2791,30 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterRuntimeSummary", + '200': "DaskClusterRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_runtime_summary_without_preload_content( self, @@ -2563,7 +2822,10 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2596,22 +2858,26 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterRuntimeSummary", + '200': "DaskClusterRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_runtime_summary_serialize( self, dask_cluster_id, @@ -2623,33 +2889,44 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/runtimesummary", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2659,9 +2936,12 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_scheduler_info( self, @@ -2669,7 +2949,10 @@ async def get_scheduler_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2701,26 +2984,30 @@ async def get_scheduler_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_scheduler_info_with_http_info( self, @@ -2728,7 +3015,10 @@ async def get_scheduler_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2760,26 +3050,30 @@ async def get_scheduler_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_scheduler_info_without_preload_content( self, @@ -2787,7 +3081,10 @@ async def get_scheduler_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2819,22 +3116,26 @@ async def get_scheduler_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_scheduler_info_serialize( self, dask_cluster_id, @@ -2846,33 +3147,44 @@ def _get_scheduler_info_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/scheduler_info", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/scheduler_info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2882,9 +3194,12 @@ def _get_scheduler_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_scheduler_runtimesummary( self, @@ -2892,7 +3207,10 @@ async def get_scheduler_runtimesummary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2925,26 +3243,30 @@ async def get_scheduler_runtimesummary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_runtimesummary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummary", + '200': "PodRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_scheduler_runtimesummary_with_http_info( self, @@ -2952,7 +3274,10 @@ async def get_scheduler_runtimesummary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2985,26 +3310,30 @@ async def get_scheduler_runtimesummary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_runtimesummary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummary", + '200': "PodRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_scheduler_runtimesummary_without_preload_content( self, @@ -3012,7 +3341,10 @@ async def get_scheduler_runtimesummary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3045,22 +3377,26 @@ async def get_scheduler_runtimesummary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_runtimesummary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PodRuntimeSummary", + '200': "PodRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_scheduler_runtimesummary_serialize( self, dask_cluster_id, @@ -3072,33 +3408,44 @@ def _get_scheduler_runtimesummary_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/scheduler/runtimesummary", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/scheduler/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3108,9 +3455,12 @@ def _get_scheduler_runtimesummary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_scheduler_status( self, @@ -3118,7 +3468,10 @@ async def get_scheduler_status( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3150,26 +3503,30 @@ async def get_scheduler_status( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_status_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_scheduler_status_with_http_info( self, @@ -3177,7 +3534,10 @@ async def get_scheduler_status_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3209,26 +3569,30 @@ async def get_scheduler_status_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_status_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_scheduler_status_without_preload_content( self, @@ -3236,7 +3600,10 @@ async def get_scheduler_status_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3268,22 +3635,26 @@ async def get_scheduler_status_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_status_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Dict[str, object]", + '200': "Dict[str, object]", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_scheduler_status_serialize( self, dask_cluster_id, @@ -3295,33 +3666,44 @@ def _get_scheduler_status_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/status", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3331,16 +3713,22 @@ def _get_scheduler_status_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3370,32 +3758,39 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterServerOptions", + '200': "DaskClusterServerOptions", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3425,32 +3820,39 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterServerOptions", + '200': "DaskClusterServerOptions", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3480,21 +3882,25 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterServerOptions", + '200': "DaskClusterServerOptions", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_server_options_serialize( self, _request_auth, @@ -3505,13 +3911,16 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3520,16 +3929,24 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/info", + method='GET', + resource_path='/api/dask_clusters/info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3539,9 +3956,12 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_token_info( self, @@ -3549,7 +3969,10 @@ async def get_token_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3581,26 +4004,30 @@ async def get_token_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_token_info_with_http_info( self, @@ -3608,7 +4035,10 @@ async def get_token_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3640,26 +4070,30 @@ async def get_token_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_token_info_without_preload_content( self, @@ -3667,7 +4101,10 @@ async def get_token_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3699,22 +4136,26 @@ async def get_token_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_token_info_serialize( self, dask_cluster_id, @@ -3726,33 +4167,44 @@ def _get_token_info_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/token", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3762,44 +4214,32 @@ def _get_token_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3850,7 +4290,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -3866,54 +4306,43 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterList", + '200': "DaskClusterList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3964,7 +4393,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -3980,54 +4409,43 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterList", + '200': "DaskClusterList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4078,7 +4496,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4094,15 +4512,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskClusterList", + '200': "DaskClusterList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -4123,71 +4545,82 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters", + method='GET', + resource_path='/api/dask_clusters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4197,23 +4630,26 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_worker_runtime_summaries( self, dask_cluster_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4251,7 +4687,7 @@ async def list_worker_runtime_summaries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_worker_runtime_summaries_serialize( dask_cluster_id=dask_cluster_id, @@ -4261,33 +4697,37 @@ async def list_worker_runtime_summaries( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskWorkerRuntimeSummaryList", + '200': "DaskWorkerRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_worker_runtime_summaries_with_http_info( self, dask_cluster_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4325,7 +4765,7 @@ async def list_worker_runtime_summaries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_worker_runtime_summaries_serialize( dask_cluster_id=dask_cluster_id, @@ -4335,33 +4775,37 @@ async def list_worker_runtime_summaries_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskWorkerRuntimeSummaryList", + '200': "DaskWorkerRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_worker_runtime_summaries_without_preload_content( self, dask_cluster_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4399,7 +4843,7 @@ async def list_worker_runtime_summaries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_worker_runtime_summaries_serialize( dask_cluster_id=dask_cluster_id, @@ -4409,15 +4853,19 @@ async def list_worker_runtime_summaries_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskWorkerRuntimeSummaryList", + '200': "DaskWorkerRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_worker_runtime_summaries_serialize( self, dask_cluster_id, @@ -4432,45 +4880,56 @@ def _list_worker_runtime_summaries_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/dask_clusters/{dask_cluster_id}/workers/runtimesummary", + method='GET', + resource_path='/api/dask_clusters/{dask_cluster_id}/workers/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4480,9 +4939,12 @@ def _list_worker_runtime_summaries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def restart( self, @@ -4490,7 +4952,10 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4523,26 +4988,30 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def restart_with_http_info( self, @@ -4550,7 +5019,10 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4583,26 +5055,30 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def restart_without_preload_content( self, @@ -4610,7 +5086,10 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4643,22 +5122,26 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _restart_serialize( self, dask_cluster_id, @@ -4670,33 +5153,44 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters/{dask_cluster_id}/restart", + method='POST', + resource_path='/api/dask_clusters/{dask_cluster_id}/restart', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4706,9 +5200,12 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def rotate_token( self, @@ -4716,7 +5213,10 @@ async def rotate_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4749,26 +5249,30 @@ async def rotate_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def rotate_token_with_http_info( self, @@ -4776,7 +5280,10 @@ async def rotate_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4809,26 +5316,30 @@ async def rotate_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def rotate_token_without_preload_content( self, @@ -4836,7 +5347,10 @@ async def rotate_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4869,22 +5383,26 @@ async def rotate_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _rotate_token_serialize( self, dask_cluster_id, @@ -4896,33 +5414,44 @@ def _rotate_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters/{dask_cluster_id}/token", + method='POST', + resource_path='/api/dask_clusters/{dask_cluster_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4932,9 +5461,12 @@ def _rotate_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def scale( self, @@ -4943,7 +5475,10 @@ async def scale( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4977,7 +5512,7 @@ async def scale( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._scale_serialize( dask_cluster_id=dask_cluster_id, @@ -4985,19 +5520,23 @@ async def scale( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def scale_with_http_info( self, @@ -5006,7 +5545,10 @@ async def scale_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5040,7 +5582,7 @@ async def scale_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._scale_serialize( dask_cluster_id=dask_cluster_id, @@ -5048,19 +5590,23 @@ async def scale_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def scale_without_preload_content( self, @@ -5069,7 +5615,10 @@ async def scale_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5103,7 +5652,7 @@ async def scale_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._scale_serialize( dask_cluster_id=dask_cluster_id, @@ -5111,15 +5660,19 @@ async def scale_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _scale_serialize( self, dask_cluster_id, @@ -5132,18 +5685,21 @@ def _scale_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -5151,20 +5707,30 @@ def _scale_serialize( if dask_cluster_scale is not None: _body_params = dask_cluster_scale + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters/{dask_cluster_id}/scale", + method='POST', + resource_path='/api/dask_clusters/{dask_cluster_id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5174,9 +5740,12 @@ def _scale_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def start( self, @@ -5184,7 +5753,10 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5217,26 +5789,30 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def start_with_http_info( self, @@ -5244,7 +5820,10 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5277,26 +5856,30 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def start_without_preload_content( self, @@ -5304,7 +5887,10 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5337,22 +5923,26 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _start_serialize( self, dask_cluster_id, @@ -5364,33 +5954,44 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters/{dask_cluster_id}/start", + method='POST', + resource_path='/api/dask_clusters/{dask_cluster_id}/start', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5400,9 +6001,12 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def stop( self, @@ -5410,7 +6014,10 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5443,26 +6050,30 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def stop_with_http_info( self, @@ -5470,7 +6081,10 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5503,26 +6117,30 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def stop_without_preload_content( self, @@ -5530,7 +6148,10 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5563,22 +6184,26 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _stop_serialize( self, dask_cluster_id, @@ -5590,33 +6215,44 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/dask_clusters/{dask_cluster_id}/stop", + method='POST', + resource_path='/api/dask_clusters/{dask_cluster_id}/stop', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5626,9 +6262,12 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -5637,7 +6276,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5672,7 +6314,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( dask_cluster_id=dask_cluster_id, @@ -5680,19 +6322,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -5701,7 +6347,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5736,7 +6385,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( dask_cluster_id=dask_cluster_id, @@ -5744,19 +6393,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -5765,7 +6418,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5800,7 +6456,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( dask_cluster_id=dask_cluster_id, @@ -5808,15 +6464,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DaskCluster", + '200': "DaskCluster", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, dask_cluster_id, @@ -5829,18 +6489,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -5848,24 +6511,37 @@ def _update_serialize( if dask_cluster_update is not None: _body_params = dask_cluster_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/dask_clusters/{dask_cluster_id}", + method='PATCH', + resource_path='/api/dask_clusters/{dask_cluster_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5875,9 +6551,12 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_token( self, @@ -5886,7 +6565,10 @@ async def update_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5921,7 +6603,7 @@ async def update_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( dask_cluster_id=dask_cluster_id, @@ -5929,19 +6611,23 @@ async def update_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_token_with_http_info( self, @@ -5950,7 +6636,10 @@ async def update_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5985,7 +6674,7 @@ async def update_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( dask_cluster_id=dask_cluster_id, @@ -5993,19 +6682,23 @@ async def update_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_token_without_preload_content( self, @@ -6014,7 +6707,10 @@ async def update_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6049,7 +6745,7 @@ async def update_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( dask_cluster_id=dask_cluster_id, @@ -6057,15 +6753,19 @@ async def update_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_token_serialize( self, dask_cluster_id, @@ -6078,18 +6778,21 @@ def _update_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params["dask_cluster_id"] = dask_cluster_id + _path_params['dask_cluster_id'] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -6097,24 +6800,37 @@ def _update_token_serialize( if resource_token_update is not None: _body_params = resource_token_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/dask_clusters/{dask_cluster_id}/token", + method='PATCH', + resource_path='/api/dask_clusters/{dask_cluster_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6124,5 +6840,7 @@ def _update_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/deployments_api.py b/saturn_api/api/deployments_api.py index 4fe8104..a435160 100644 --- a/saturn_api/api/deployments_api.py +++ b/saturn_api/api/deployments_api.py @@ -1,32 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.deployment import Deployment from saturn_api.models.deployment_create import DeploymentCreate from saturn_api.models.deployment_list import DeploymentList @@ -50,12 +42,13 @@ from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate from saturn_api.models.service_account_attachment import ServiceAccountAttachment -from saturn_api.models.service_account_create_attachment import ( - ServiceAccountCreateAttachment, -) +from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment from saturn_api.models.viewer import Viewer from saturn_api.models.viewer_create import ViewerCreate from saturn_api.models.viewer_list import ViewerList + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -71,6 +64,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -78,7 +72,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -111,26 +108,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( deployment_create=deployment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Deployment", + '201': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -138,7 +139,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -171,26 +175,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( deployment_create=deployment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Deployment", + '201': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -198,7 +206,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -231,22 +242,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( deployment_create=deployment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Deployment", + '201': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, deployment_create, @@ -258,13 +273,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -275,24 +293,37 @@ def _create_serialize( if deployment_create is not None: _body_params = deployment_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments", + method='POST', + resource_path='/api/deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -302,9 +333,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_resource_template( self, @@ -312,7 +346,10 @@ async def create_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -344,26 +381,30 @@ async def create_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_resource_template_with_http_info( self, @@ -371,7 +412,10 @@ async def create_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -403,26 +447,30 @@ async def create_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_resource_template_without_preload_content( self, @@ -430,7 +478,10 @@ async def create_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -462,22 +513,26 @@ async def create_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_resource_template_serialize( self, deployment_id, @@ -489,33 +544,44 @@ def _create_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/template", + method='POST', + resource_path='/api/deployments/{deployment_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -525,9 +591,12 @@ def _create_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_route( self, @@ -536,7 +605,10 @@ async def create_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -571,7 +643,7 @@ async def create_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( deployment_id=deployment_id, @@ -579,19 +651,23 @@ async def create_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Route", + '201': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_route_with_http_info( self, @@ -600,7 +676,10 @@ async def create_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -635,7 +714,7 @@ async def create_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( deployment_id=deployment_id, @@ -643,19 +722,23 @@ async def create_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Route", + '201': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_route_without_preload_content( self, @@ -664,7 +747,10 @@ async def create_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -699,7 +785,7 @@ async def create_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( deployment_id=deployment_id, @@ -707,15 +793,19 @@ async def create_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Route", + '201': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_route_serialize( self, deployment_id, @@ -728,18 +818,21 @@ def _create_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -747,24 +840,37 @@ def _create_route_serialize( if route_create is not None: _body_params = route_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/routes", + method='POST', + resource_path='/api/deployments/{deployment_id}/routes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -774,9 +880,12 @@ def _create_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_secret_attachment( self, @@ -785,7 +894,10 @@ async def create_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -819,7 +931,7 @@ async def create_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( deployment_id=deployment_id, @@ -827,19 +939,23 @@ async def create_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_secret_attachment_with_http_info( self, @@ -848,7 +964,10 @@ async def create_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -882,7 +1001,7 @@ async def create_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( deployment_id=deployment_id, @@ -890,19 +1009,23 @@ async def create_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_secret_attachment_without_preload_content( self, @@ -911,7 +1034,10 @@ async def create_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -945,7 +1071,7 @@ async def create_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( deployment_id=deployment_id, @@ -953,15 +1079,19 @@ async def create_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_secret_attachment_serialize( self, deployment_id, @@ -974,18 +1104,21 @@ def _create_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -993,24 +1126,37 @@ def _create_secret_attachment_serialize( if secret_attachment_create is not None: _body_params = secret_attachment_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/secrets", + method='POST', + resource_path='/api/deployments/{deployment_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1020,9 +1166,12 @@ def _create_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_service_account_attachment( self, @@ -1031,7 +1180,10 @@ async def create_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1065,7 +1217,7 @@ async def create_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( deployment_id=deployment_id, @@ -1073,19 +1225,23 @@ async def create_service_account_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_service_account_attachment_with_http_info( self, @@ -1094,7 +1250,10 @@ async def create_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1128,7 +1287,7 @@ async def create_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( deployment_id=deployment_id, @@ -1136,19 +1295,23 @@ async def create_service_account_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_service_account_attachment_without_preload_content( self, @@ -1157,7 +1320,10 @@ async def create_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1191,7 +1357,7 @@ async def create_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( deployment_id=deployment_id, @@ -1199,15 +1365,19 @@ async def create_service_account_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_service_account_attachment_serialize( self, deployment_id, @@ -1220,18 +1390,21 @@ def _create_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -1239,24 +1412,37 @@ def _create_service_account_attachment_serialize( if service_account_create_attachment is not None: _body_params = service_account_create_attachment + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/api/deployments/{deployment_id}/service_account", + method='PUT', + resource_path='/api/deployments/{deployment_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1266,9 +1452,12 @@ def _create_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_viewer( self, @@ -1277,7 +1466,10 @@ async def create_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1312,7 +1504,7 @@ async def create_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( deployment_id=deployment_id, @@ -1320,19 +1512,23 @@ async def create_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Viewer", + '201': "Viewer", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_viewer_with_http_info( self, @@ -1341,7 +1537,10 @@ async def create_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1376,7 +1575,7 @@ async def create_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( deployment_id=deployment_id, @@ -1384,19 +1583,23 @@ async def create_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Viewer", + '201': "Viewer", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_viewer_without_preload_content( self, @@ -1405,7 +1608,10 @@ async def create_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1440,7 +1646,7 @@ async def create_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( deployment_id=deployment_id, @@ -1448,15 +1654,19 @@ async def create_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Viewer", + '201': "Viewer", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_viewer_serialize( self, deployment_id, @@ -1469,18 +1679,21 @@ def _create_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -1488,24 +1701,37 @@ def _create_viewer_serialize( if viewer_create is not None: _body_params = viewer_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/viewers", + method='POST', + resource_path='/api/deployments/{deployment_id}/viewers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1515,21 +1741,24 @@ def _create_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, deployment_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete deployment that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete deployment that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1564,7 +1793,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( deployment_id=deployment_id, @@ -1572,31 +1801,35 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, deployment_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete deployment that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete deployment that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1631,7 +1864,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( deployment_id=deployment_id, @@ -1639,31 +1872,35 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, deployment_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete deployment that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete deployment that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1698,7 +1935,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( deployment_id=deployment_id, @@ -1706,15 +1943,19 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, deployment_id, @@ -1727,33 +1968,41 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if allow_active is not None: - - _query_params.append(("allow_active", allow_active)) - + + _query_params.append(('allow_active', allow_active)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/deployments/{deployment_id}", + method='DELETE', + resource_path='/api/deployments/{deployment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1763,9 +2012,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_route( self, @@ -1774,7 +2026,10 @@ async def delete_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1809,7 +2064,7 @@ async def delete_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( deployment_id=deployment_id, @@ -1817,19 +2072,23 @@ async def delete_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_route_with_http_info( self, @@ -1838,7 +2097,10 @@ async def delete_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1873,7 +2135,7 @@ async def delete_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( deployment_id=deployment_id, @@ -1881,19 +2143,23 @@ async def delete_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_route_without_preload_content( self, @@ -1902,7 +2168,10 @@ async def delete_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1937,7 +2206,7 @@ async def delete_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( deployment_id=deployment_id, @@ -1945,15 +2214,19 @@ async def delete_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_route_serialize( self, deployment_id, @@ -1966,31 +2239,39 @@ def _delete_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if route_id is not None: - _path_params["route_id"] = route_id + _path_params['route_id'] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/deployments/{deployment_id}/routes/{route_id}", + method='DELETE', + resource_path='/api/deployments/{deployment_id}/routes/{route_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2000,9 +2281,12 @@ def _delete_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_secret_attachment( self, @@ -2011,7 +2295,10 @@ async def delete_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2045,7 +2332,7 @@ async def delete_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( deployment_id=deployment_id, @@ -2053,19 +2340,23 @@ async def delete_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_secret_attachment_with_http_info( self, @@ -2074,7 +2365,10 @@ async def delete_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2108,7 +2402,7 @@ async def delete_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( deployment_id=deployment_id, @@ -2116,19 +2410,23 @@ async def delete_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_secret_attachment_without_preload_content( self, @@ -2137,7 +2435,10 @@ async def delete_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2171,7 +2472,7 @@ async def delete_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( deployment_id=deployment_id, @@ -2179,15 +2480,19 @@ async def delete_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_secret_attachment_serialize( self, deployment_id, @@ -2200,31 +2505,39 @@ def _delete_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/deployments/{deployment_id}/secrets/{secret_attachment_id}", + method='DELETE', + resource_path='/api/deployments/{deployment_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2234,9 +2547,12 @@ def _delete_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_service_account_attachment( self, @@ -2244,7 +2560,10 @@ async def delete_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2276,26 +2595,30 @@ async def delete_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_service_account_attachment_with_http_info( self, @@ -2303,7 +2626,10 @@ async def delete_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2335,26 +2661,30 @@ async def delete_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_service_account_attachment_without_preload_content( self, @@ -2362,7 +2692,10 @@ async def delete_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2394,22 +2727,26 @@ async def delete_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_service_account_attachment_serialize( self, deployment_id, @@ -2421,29 +2758,37 @@ def _delete_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/deployments/{deployment_id}/service_account", + method='DELETE', + resource_path='/api/deployments/{deployment_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2453,9 +2798,12 @@ def _delete_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_viewer( self, @@ -2464,7 +2812,10 @@ async def delete_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2499,7 +2850,7 @@ async def delete_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( deployment_id=deployment_id, @@ -2507,19 +2858,23 @@ async def delete_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_viewer_with_http_info( self, @@ -2528,7 +2883,10 @@ async def delete_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2563,7 +2921,7 @@ async def delete_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( deployment_id=deployment_id, @@ -2571,19 +2929,23 @@ async def delete_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_viewer_without_preload_content( self, @@ -2592,7 +2954,10 @@ async def delete_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2627,7 +2992,7 @@ async def delete_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( deployment_id=deployment_id, @@ -2635,15 +3000,19 @@ async def delete_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_viewer_serialize( self, deployment_id, @@ -2656,31 +3025,39 @@ def _delete_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if viewer_id is not None: - _path_params["viewer_id"] = viewer_id + _path_params['viewer_id'] = viewer_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/deployments/{deployment_id}/viewers/{viewer_id}", + method='DELETE', + resource_path='/api/deployments/{deployment_id}/viewers/{viewer_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2690,9 +3067,12 @@ def _delete_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -2700,7 +3080,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2733,26 +3116,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -2760,7 +3147,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2793,26 +3183,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -2820,7 +3214,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2853,22 +3250,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, deployment_id, @@ -2880,33 +3281,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}", + method='GET', + resource_path='/api/deployments/{deployment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2916,9 +3328,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_cluster_history( self, @@ -2926,7 +3341,10 @@ async def get_cluster_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2959,26 +3377,30 @@ async def get_cluster_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_cluster_history_with_http_info( self, @@ -2986,7 +3408,10 @@ async def get_cluster_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3019,26 +3444,30 @@ async def get_cluster_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_cluster_history_without_preload_content( self, @@ -3046,7 +3475,10 @@ async def get_cluster_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3079,22 +3511,26 @@ async def get_cluster_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_cluster_history_serialize( self, deployment_id, @@ -3106,33 +3542,44 @@ def _get_cluster_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/clusters", + method='GET', + resource_path='/api/deployments/{deployment_id}/clusters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3142,29 +3589,28 @@ def _get_cluster_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_logs( self, deployment_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3207,7 +3653,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( deployment_id=deployment_id, @@ -3219,39 +3665,39 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_logs_with_http_info( self, deployment_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3294,7 +3740,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( deployment_id=deployment_id, @@ -3306,39 +3752,39 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_logs_without_preload_content( self, deployment_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3381,7 +3827,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( deployment_id=deployment_id, @@ -3393,15 +3839,19 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_logs_serialize( self, deployment_id, @@ -3418,53 +3868,64 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if pod_name is not None: - - _query_params.append(("pod_name", pod_name)) - + + _query_params.append(('pod_name', pod_name)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/logs", + method='GET', + resource_path='/api/deployments/{deployment_id}/logs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3474,32 +3935,28 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_metrics( self, deployment_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3542,7 +3999,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( deployment_id=deployment_id, @@ -3554,42 +4011,39 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_metrics_with_http_info( self, deployment_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3632,7 +4086,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( deployment_id=deployment_id, @@ -3644,42 +4098,39 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_metrics_without_preload_content( self, deployment_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3722,7 +4173,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( deployment_id=deployment_id, @@ -3734,15 +4185,19 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_metrics_serialize( self, deployment_id, @@ -3759,61 +4214,82 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if type is not None: - - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if resolution is not None: - - _query_params.append(("resolution", resolution)) - + + _query_params.append(('resolution', resolution)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/metrics", + method='GET', + resource_path='/api/deployments/{deployment_id}/metrics', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3823,20 +4299,24 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_pod_history( self, deployment_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3871,7 +4351,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( deployment_id=deployment_id, @@ -3879,30 +4359,35 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_pod_history_with_http_info( self, deployment_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3937,7 +4422,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( deployment_id=deployment_id, @@ -3945,30 +4430,35 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_pod_history_without_preload_content( self, deployment_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4003,7 +4493,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( deployment_id=deployment_id, @@ -4011,15 +4501,19 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_pod_history_serialize( self, deployment_id, @@ -4032,37 +4526,48 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/history", + method='GET', + resource_path='/api/deployments/{deployment_id}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4072,9 +4577,12 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_recipe( self, @@ -4083,7 +4591,10 @@ async def get_recipe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4117,7 +4628,7 @@ async def get_recipe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( deployment_id=deployment_id, @@ -4125,19 +4636,23 @@ async def get_recipe( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRecipe", + '200': "DeploymentRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_recipe_with_http_info( self, @@ -4146,7 +4661,10 @@ async def get_recipe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4180,7 +4698,7 @@ async def get_recipe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( deployment_id=deployment_id, @@ -4188,19 +4706,23 @@ async def get_recipe_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRecipe", + '200': "DeploymentRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_recipe_without_preload_content( self, @@ -4209,7 +4731,10 @@ async def get_recipe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4243,7 +4768,7 @@ async def get_recipe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( deployment_id=deployment_id, @@ -4251,15 +4776,19 @@ async def get_recipe_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRecipe", + '200': "DeploymentRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_recipe_serialize( self, deployment_id, @@ -4272,37 +4801,48 @@ def _get_recipe_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if as_template is not None: - - _query_params.append(("as_template", as_template)) - + + _query_params.append(('as_template', as_template)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/recipe", + method='GET', + resource_path='/api/deployments/{deployment_id}/recipe', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4312,9 +4852,12 @@ def _get_recipe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_resource_template( self, @@ -4322,7 +4865,10 @@ async def get_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4354,26 +4900,30 @@ async def get_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_resource_template_with_http_info( self, @@ -4381,7 +4931,10 @@ async def get_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4413,26 +4966,30 @@ async def get_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_resource_template_without_preload_content( self, @@ -4440,7 +4997,10 @@ async def get_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4472,22 +5032,26 @@ async def get_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_resource_template_serialize( self, deployment_id, @@ -4499,33 +5063,44 @@ def _get_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/template", + method='GET', + resource_path='/api/deployments/{deployment_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4535,9 +5110,12 @@ def _get_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_route( self, @@ -4546,7 +5124,10 @@ async def get_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4581,7 +5162,7 @@ async def get_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( deployment_id=deployment_id, @@ -4589,19 +5170,23 @@ async def get_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_route_with_http_info( self, @@ -4610,7 +5195,10 @@ async def get_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4645,7 +5233,7 @@ async def get_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( deployment_id=deployment_id, @@ -4653,19 +5241,23 @@ async def get_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_route_without_preload_content( self, @@ -4674,7 +5266,10 @@ async def get_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4709,7 +5304,7 @@ async def get_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( deployment_id=deployment_id, @@ -4717,15 +5312,19 @@ async def get_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_route_serialize( self, deployment_id, @@ -4738,35 +5337,46 @@ def _get_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if route_id is not None: - _path_params["route_id"] = route_id + _path_params['route_id'] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/routes/{route_id}", + method='GET', + resource_path='/api/deployments/{deployment_id}/routes/{route_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4776,9 +5386,12 @@ def _get_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_runtime_summary( self, @@ -4786,7 +5399,10 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4819,26 +5435,30 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRuntimeSummary", + '200': "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_runtime_summary_with_http_info( self, @@ -4846,7 +5466,10 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4879,26 +5502,30 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRuntimeSummary", + '200': "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_runtime_summary_without_preload_content( self, @@ -4906,7 +5533,10 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4939,22 +5569,26 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentRuntimeSummary", + '200': "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_runtime_summary_serialize( self, deployment_id, @@ -4966,33 +5600,44 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/runtimesummary", + method='GET', + resource_path='/api/deployments/{deployment_id}/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5002,9 +5647,12 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_secret_attachment( self, @@ -5013,7 +5661,10 @@ async def get_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5047,7 +5698,7 @@ async def get_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( deployment_id=deployment_id, @@ -5055,19 +5706,23 @@ async def get_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_secret_attachment_with_http_info( self, @@ -5076,7 +5731,10 @@ async def get_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5110,7 +5768,7 @@ async def get_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( deployment_id=deployment_id, @@ -5118,19 +5776,23 @@ async def get_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_secret_attachment_without_preload_content( self, @@ -5139,7 +5801,10 @@ async def get_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5173,7 +5838,7 @@ async def get_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( deployment_id=deployment_id, @@ -5181,15 +5846,19 @@ async def get_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_secret_attachment_serialize( self, deployment_id, @@ -5202,35 +5871,46 @@ def _get_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/secrets/{secret_attachment_id}", + method='GET', + resource_path='/api/deployments/{deployment_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5240,16 +5920,22 @@ def _get_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5279,32 +5965,39 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentServerInfo", + '200': "DeploymentServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5334,32 +6027,39 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentServerInfo", + '200': "DeploymentServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5389,21 +6089,25 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentServerInfo", + '200': "DeploymentServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_server_options_serialize( self, _request_auth, @@ -5414,13 +6118,16 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5429,16 +6136,24 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/info", + method='GET', + resource_path='/api/deployments/info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5448,9 +6163,12 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_service_account_attachment( self, @@ -5458,7 +6176,10 @@ async def get_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5490,26 +6211,30 @@ async def get_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_service_account_attachment_with_http_info( self, @@ -5517,7 +6242,10 @@ async def get_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5549,26 +6277,30 @@ async def get_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_service_account_attachment_without_preload_content( self, @@ -5576,7 +6308,10 @@ async def get_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5608,22 +6343,26 @@ async def get_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_service_account_attachment_serialize( self, deployment_id, @@ -5635,33 +6374,44 @@ def _get_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/service_account", + method='GET', + resource_path='/api/deployments/{deployment_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5671,48 +6421,34 @@ def _get_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on deployment name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on deployment name.")] = None, + tags: Annotated[Optional[StrictStr], Field(description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5735,8 +6471,10 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on deployment name. + :param name: Substring matched search string on deployment name. :type name: str + :param tags: Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. + :type tags: str :param prev_key: Previous page key. :type prev_key: str :param next_key: Next page key. @@ -5765,7 +6503,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -5775,6 +6513,7 @@ async def list( org_id=org_id, owner=owner, name=name, + tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, @@ -5782,58 +6521,45 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentList", + '200': "DeploymentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on deployment name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on deployment name.")] = None, + tags: Annotated[Optional[StrictStr], Field(description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5856,8 +6582,10 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on deployment name. + :param name: Substring matched search string on deployment name. :type name: str + :param tags: Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. + :type tags: str :param prev_key: Previous page key. :type prev_key: str :param next_key: Next page key. @@ -5886,7 +6614,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -5896,6 +6624,7 @@ async def list_with_http_info( org_id=org_id, owner=owner, name=name, + tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, @@ -5903,58 +6632,45 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentList", + '200': "DeploymentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on deployment name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on deployment name.")] = None, + tags: Annotated[Optional[StrictStr], Field(description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5977,8 +6693,10 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on deployment name. + :param name: Substring matched search string on deployment name. :type name: str + :param tags: Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. + :type tags: str :param prev_key: Previous page key. :type prev_key: str :param next_key: Next page key. @@ -6007,7 +6725,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6017,6 +6735,7 @@ async def list_without_preload_content( org_id=org_id, owner=owner, name=name, + tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, @@ -6024,15 +6743,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeploymentList", + '200': "DeploymentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -6042,6 +6765,7 @@ def _list_serialize( org_id, owner, name, + tags, prev_key, next_key, page_size, @@ -6054,75 +6778,90 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + + if tags is not None: + + _query_params.append(('tags', tags)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments", + method='GET', + resource_path='/api/deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6132,30 +6871,28 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_routes( self, deployment_id: StrictStr, - subdomain: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on route subdomain."), - ] = None, + subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6168,7 +6905,7 @@ async def list_routes( :param deployment_id: (required) :type deployment_id: str - :param subdomain: Prefix matched search string on route subdomain. + :param subdomain: Substring matched search string on route subdomain. :type subdomain: str :param prev_key: Previous page key. :type prev_key: str @@ -6198,7 +6935,7 @@ async def list_routes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( deployment_id=deployment_id, @@ -6210,40 +6947,39 @@ async def list_routes( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteList", + '200': "RouteList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_routes_with_http_info( self, deployment_id: StrictStr, - subdomain: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on route subdomain."), - ] = None, + subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6256,7 +6992,7 @@ async def list_routes_with_http_info( :param deployment_id: (required) :type deployment_id: str - :param subdomain: Prefix matched search string on route subdomain. + :param subdomain: Substring matched search string on route subdomain. :type subdomain: str :param prev_key: Previous page key. :type prev_key: str @@ -6286,7 +7022,7 @@ async def list_routes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( deployment_id=deployment_id, @@ -6298,40 +7034,39 @@ async def list_routes_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteList", + '200': "RouteList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_routes_without_preload_content( self, deployment_id: StrictStr, - subdomain: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on route subdomain."), - ] = None, + subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6344,7 +7079,7 @@ async def list_routes_without_preload_content( :param deployment_id: (required) :type deployment_id: str - :param subdomain: Prefix matched search string on route subdomain. + :param subdomain: Substring matched search string on route subdomain. :type subdomain: str :param prev_key: Previous page key. :type prev_key: str @@ -6374,7 +7109,7 @@ async def list_routes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( deployment_id=deployment_id, @@ -6386,15 +7121,19 @@ async def list_routes_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteList", + '200': "RouteList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_routes_serialize( self, deployment_id, @@ -6411,53 +7150,64 @@ def _list_routes_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if subdomain is not None: - - _query_params.append(("subdomain", subdomain)) - + + _query_params.append(('subdomain', subdomain)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/routes", + method='GET', + resource_path='/api/deployments/{deployment_id}/routes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6467,33 +7217,29 @@ def _list_routes_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_secret_attachments( self, deployment_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6505,7 +7251,7 @@ async def list_secret_attachments( :param deployment_id: (required) :type deployment_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -6537,7 +7283,7 @@ async def list_secret_attachments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( deployment_id=deployment_id, @@ -6550,43 +7296,40 @@ async def list_secret_attachments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_secret_attachments_with_http_info( self, deployment_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6598,7 +7341,7 @@ async def list_secret_attachments_with_http_info( :param deployment_id: (required) :type deployment_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -6630,7 +7373,7 @@ async def list_secret_attachments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( deployment_id=deployment_id, @@ -6643,43 +7386,40 @@ async def list_secret_attachments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_secret_attachments_without_preload_content( self, deployment_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6691,7 +7431,7 @@ async def list_secret_attachments_without_preload_content( :param deployment_id: (required) :type deployment_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -6723,7 +7463,7 @@ async def list_secret_attachments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( deployment_id=deployment_id, @@ -6736,15 +7476,19 @@ async def list_secret_attachments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_secret_attachments_serialize( self, deployment_id, @@ -6762,57 +7506,68 @@ def _list_secret_attachments_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if location is not None: - - _query_params.append(("location", location)) - + + _query_params.append(('location', location)) + if attachment_type is not None: - - _query_params.append(("attachment_type", attachment_type.value)) - + + _query_params.append(('attachment_type', attachment_type.value)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/secrets", + method='GET', + resource_path='/api/deployments/{deployment_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6822,29 +7577,28 @@ def _list_secret_attachments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_viewers( self, deployment_id: StrictStr, - route_id: Annotated[ - Optional[StrictStr], Field(description="Filter viewers by route ID.") - ] = None, + route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6887,7 +7641,7 @@ async def list_viewers( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( deployment_id=deployment_id, @@ -6899,39 +7653,39 @@ async def list_viewers( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ViewerList", + '200': "ViewerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_viewers_with_http_info( self, deployment_id: StrictStr, - route_id: Annotated[ - Optional[StrictStr], Field(description="Filter viewers by route ID.") - ] = None, + route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6974,7 +7728,7 @@ async def list_viewers_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( deployment_id=deployment_id, @@ -6986,39 +7740,39 @@ async def list_viewers_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ViewerList", + '200': "ViewerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_viewers_without_preload_content( self, deployment_id: StrictStr, - route_id: Annotated[ - Optional[StrictStr], Field(description="Filter viewers by route ID.") - ] = None, + route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7061,7 +7815,7 @@ async def list_viewers_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( deployment_id=deployment_id, @@ -7073,15 +7827,19 @@ async def list_viewers_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ViewerList", + '200': "ViewerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_viewers_serialize( self, deployment_id, @@ -7098,53 +7856,64 @@ def _list_viewers_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters if route_id is not None: - - _query_params.append(("route_id", route_id)) - + + _query_params.append(('route_id', route_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/deployments/{deployment_id}/viewers", + method='GET', + resource_path='/api/deployments/{deployment_id}/viewers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7154,9 +7923,12 @@ def _list_viewers_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def restart( self, @@ -7165,7 +7937,10 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7200,7 +7975,7 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( deployment_id=deployment_id, @@ -7208,19 +7983,23 @@ async def restart( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def restart_with_http_info( self, @@ -7229,7 +8008,10 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7264,7 +8046,7 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( deployment_id=deployment_id, @@ -7272,19 +8054,23 @@ async def restart_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def restart_without_preload_content( self, @@ -7293,7 +8079,10 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7328,7 +8117,7 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( deployment_id=deployment_id, @@ -7336,15 +8125,19 @@ async def restart_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _restart_serialize( self, deployment_id, @@ -7357,18 +8150,21 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -7376,24 +8172,37 @@ def _restart_serialize( if deployment_start is not None: _body_params = deployment_start + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/restart", + method='POST', + resource_path='/api/deployments/{deployment_id}/restart', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7403,9 +8212,12 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def start( self, @@ -7414,7 +8226,10 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7449,7 +8264,7 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( deployment_id=deployment_id, @@ -7457,19 +8272,23 @@ async def start( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def start_with_http_info( self, @@ -7478,7 +8297,10 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7513,7 +8335,7 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( deployment_id=deployment_id, @@ -7521,19 +8343,23 @@ async def start_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def start_without_preload_content( self, @@ -7542,7 +8368,10 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7577,7 +8406,7 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( deployment_id=deployment_id, @@ -7585,15 +8414,19 @@ async def start_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _start_serialize( self, deployment_id, @@ -7606,18 +8439,21 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -7625,24 +8461,37 @@ def _start_serialize( if deployment_start is not None: _body_params = deployment_start + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/start", + method='POST', + resource_path='/api/deployments/{deployment_id}/start', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7652,9 +8501,12 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def stop( self, @@ -7662,7 +8514,10 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7695,26 +8550,30 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def stop_with_http_info( self, @@ -7722,7 +8581,10 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7755,26 +8617,30 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def stop_without_preload_content( self, @@ -7782,7 +8648,10 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7815,22 +8684,26 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _stop_serialize( self, deployment_id, @@ -7842,33 +8715,44 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/deployments/{deployment_id}/stop", + method='POST', + resource_path='/api/deployments/{deployment_id}/stop', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7878,9 +8762,12 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -7889,7 +8776,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7924,7 +8814,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( deployment_id=deployment_id, @@ -7932,19 +8822,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -7953,7 +8847,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7988,7 +8885,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( deployment_id=deployment_id, @@ -7996,19 +8893,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -8017,7 +8918,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8052,7 +8956,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( deployment_id=deployment_id, @@ -8060,15 +8964,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Deployment", + '200': "Deployment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, deployment_id, @@ -8081,18 +8989,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -8100,24 +9011,37 @@ def _update_serialize( if deployment_update is not None: _body_params = deployment_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/deployments/{deployment_id}", + method='PATCH', + resource_path='/api/deployments/{deployment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8127,9 +9051,12 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_resource_template( self, @@ -8137,7 +9064,10 @@ async def update_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8169,26 +9099,30 @@ async def update_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_resource_template_with_http_info( self, @@ -8196,7 +9130,10 @@ async def update_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8228,26 +9165,30 @@ async def update_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_resource_template_without_preload_content( self, @@ -8255,7 +9196,10 @@ async def update_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8287,22 +9231,26 @@ async def update_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_resource_template_serialize( self, deployment_id, @@ -8314,33 +9262,44 @@ def _update_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/deployments/{deployment_id}/template", + method='PATCH', + resource_path='/api/deployments/{deployment_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8350,9 +9309,12 @@ def _update_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_route( self, @@ -8362,7 +9324,10 @@ async def update_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8399,7 +9364,7 @@ async def update_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( deployment_id=deployment_id, @@ -8408,19 +9373,23 @@ async def update_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_route_with_http_info( self, @@ -8430,7 +9399,10 @@ async def update_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8467,7 +9439,7 @@ async def update_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( deployment_id=deployment_id, @@ -8476,19 +9448,23 @@ async def update_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_route_without_preload_content( self, @@ -8498,7 +9474,10 @@ async def update_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8535,7 +9514,7 @@ async def update_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( deployment_id=deployment_id, @@ -8544,15 +9523,19 @@ async def update_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_route_serialize( self, deployment_id, @@ -8566,20 +9549,23 @@ def _update_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if route_id is not None: - _path_params["route_id"] = route_id + _path_params['route_id'] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -8587,24 +9573,37 @@ def _update_route_serialize( if route_update is not None: _body_params = route_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/deployments/{deployment_id}/routes/{route_id}", + method='PATCH', + resource_path='/api/deployments/{deployment_id}/routes/{route_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8614,9 +9613,12 @@ def _update_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_secret_attachment( self, @@ -8626,7 +9628,10 @@ async def update_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8662,7 +9667,7 @@ async def update_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( deployment_id=deployment_id, @@ -8671,19 +9676,23 @@ async def update_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_secret_attachment_with_http_info( self, @@ -8693,7 +9702,10 @@ async def update_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8729,7 +9741,7 @@ async def update_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( deployment_id=deployment_id, @@ -8738,19 +9750,23 @@ async def update_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_secret_attachment_without_preload_content( self, @@ -8760,7 +9776,10 @@ async def update_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8796,7 +9815,7 @@ async def update_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( deployment_id=deployment_id, @@ -8805,15 +9824,19 @@ async def update_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_secret_attachment_serialize( self, deployment_id, @@ -8827,20 +9850,23 @@ def _update_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -8848,24 +9874,37 @@ def _update_secret_attachment_serialize( if secret_attachment_update is not None: _body_params = secret_attachment_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/deployments/{deployment_id}/secrets/{secret_attachment_id}", + method='PATCH', + resource_path='/api/deployments/{deployment_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8875,5 +9914,7 @@ def _update_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/external_repo_attachments_api.py b/saturn_api/api/external_repo_attachments_api.py index d05f5f2..0770e6b 100644 --- a/saturn_api/api/external_repo_attachments_api.py +++ b/saturn_api/api/external_repo_attachments_api.py @@ -1,31 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +from pydantic import Field, StrictBool, StrictStr +from typing import Optional from typing_extensions import Annotated +from saturn_api.models.external_repo_attachment import ExternalRepoAttachment +from saturn_api.models.external_repo_attachment_create import ExternalRepoAttachmentCreate +from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList +from saturn_api.models.external_repo_attachment_update import ExternalRepoAttachmentUpdate from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse -from saturn_api.models.external_repo_attachment import ExternalRepoAttachment -from saturn_api.models.external_repo_attachment_create import ( - ExternalRepoAttachmentCreate, -) -from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList -from saturn_api.models.external_repo_attachment_update import ( - ExternalRepoAttachmentUpdate, -) from saturn_api.rest import RESTResponseType @@ -41,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -48,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -81,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_attachment_create=external_repo_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ExternalRepoAttachment", + '201': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -108,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -141,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_attachment_create=external_repo_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ExternalRepoAttachment", + '201': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -168,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -201,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_attachment_create=external_repo_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ExternalRepoAttachment", + '201': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, external_repo_attachment_create, @@ -228,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -245,24 +269,37 @@ def _create_serialize( if external_repo_attachment_create is not None: _body_params = external_repo_attachment_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/external_repo_attachments", + method='POST', + resource_path='/api/external_repo_attachments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -272,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -282,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -315,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -342,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -375,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -402,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -435,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, external_repo_attachment_id, @@ -462,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_attachment_id is not None: - _path_params["external_repo_attachment_id"] = external_repo_attachment_id + _path_params['external_repo_attachment_id'] = external_repo_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/external_repo_attachments/{external_repo_attachment_id}", + method='DELETE', + resource_path='/api/external_repo_attachments/{external_repo_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -494,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -504,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -537,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachment", + '200': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -564,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachment", + '200': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -624,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -657,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachment", + '200': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, external_repo_attachment_id, @@ -684,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_attachment_id is not None: - _path_params["external_repo_attachment_id"] = external_repo_attachment_id + _path_params['external_repo_attachment_id'] = external_repo_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/external_repo_attachments/{external_repo_attachment_id}", + method='GET', + resource_path='/api/external_repo_attachments/{external_repo_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -720,32 +824,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="Reference by deployment ID.") - ] = None, - workspace_id: Annotated[ - Optional[StrictStr], Field(description="Reference by workspace ID.") - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, + workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -790,7 +891,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -803,42 +904,40 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachmentList", + '200': "ExternalRepoAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="Reference by deployment ID.") - ] = None, - workspace_id: Annotated[ - Optional[StrictStr], Field(description="Reference by workspace ID.") - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, + workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -883,7 +982,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -896,42 +995,40 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachmentList", + '200': "ExternalRepoAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="Reference by deployment ID.") - ] = None, - workspace_id: Annotated[ - Optional[StrictStr], Field(description="Reference by workspace ID.") - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, + workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -976,7 +1073,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -989,15 +1086,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachmentList", + '200': "ExternalRepoAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, job_id, @@ -1015,59 +1116,70 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if job_id is not None: - - _query_params.append(("job_id", job_id)) - + + _query_params.append(('job_id', job_id)) + if deployment_id is not None: - - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if workspace_id is not None: - - _query_params.append(("workspace_id", workspace_id)) - + + _query_params.append(('workspace_id', workspace_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/external_repo_attachments", + method='GET', + resource_path='/api/external_repo_attachments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1077,9 +1189,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1088,7 +1203,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1123,7 +1241,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_attachment_id=external_repo_attachment_id, @@ -1131,19 +1249,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachment", + '200': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1152,7 +1274,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1187,7 +1312,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_attachment_id=external_repo_attachment_id, @@ -1195,19 +1320,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachment", + '200': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1216,7 +1345,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1251,7 +1383,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_attachment_id=external_repo_attachment_id, @@ -1259,15 +1391,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoAttachment", + '200': "ExternalRepoAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, external_repo_attachment_id, @@ -1280,18 +1416,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_attachment_id is not None: - _path_params["external_repo_attachment_id"] = external_repo_attachment_id + _path_params['external_repo_attachment_id'] = external_repo_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -1299,24 +1438,37 @@ def _update_serialize( if external_repo_attachment_update is not None: _body_params = external_repo_attachment_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/external_repo_attachments/{external_repo_attachment_id}", + method='PATCH', + resource_path='/api/external_repo_attachments/{external_repo_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1326,5 +1478,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/external_repos_api.py b/saturn_api/api/external_repos_api.py index 1609bf7..46f782d 100644 --- a/saturn_api/api/external_repos_api.py +++ b/saturn_api/api/external_repos_api.py @@ -1,35 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.external_repo import ExternalRepo from saturn_api.models.external_repo_create import ExternalRepoCreate from saturn_api.models.external_repo_list import ExternalRepoList from saturn_api.models.external_repo_update import ExternalRepoUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -45,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -52,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_create=external_repo_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ExternalRepo", + '201': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -112,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -145,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_create=external_repo_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ExternalRepo", + '201': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -172,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -205,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_create=external_repo_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ExternalRepo", + '201': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, external_repo_create, @@ -232,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -249,24 +269,37 @@ def _create_serialize( if external_repo_create is not None: _body_params = external_repo_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/external_repos", + method='POST', + resource_path='/api/external_repos', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -276,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -286,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -346,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -379,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -406,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -439,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, external_repo_id, @@ -466,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_id is not None: - _path_params["external_repo_id"] = external_repo_id + _path_params['external_repo_id'] = external_repo_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/external_repos/{external_repo_id}", + method='DELETE', + resource_path='/api/external_repos/{external_repo_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -498,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -508,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -541,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepo", + '200': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -568,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepo", + '200': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -628,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -661,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepo", + '200': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, external_repo_id, @@ -688,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_id is not None: - _path_params["external_repo_id"] = external_repo_id + _path_params['external_repo_id'] = external_repo_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/external_repos/{external_repo_id}", + method='GET', + resource_path='/api/external_repos/{external_repo_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -724,48 +824,33 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - remote_url: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on repository remote URL."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + remote_url: Annotated[Optional[StrictStr], Field(description="Substring matched search string on repository remote URL.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -788,7 +873,7 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param remote_url: Prefix matched search string on repository remote URL. + :param remote_url: Substring matched search string on repository remote URL. :type remote_url: str :param prev_key: Previous page key. :type prev_key: str @@ -818,7 +903,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -835,58 +920,44 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoList", + '200': "ExternalRepoList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - remote_url: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on repository remote URL."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + remote_url: Annotated[Optional[StrictStr], Field(description="Substring matched search string on repository remote URL.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -909,7 +980,7 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param remote_url: Prefix matched search string on repository remote URL. + :param remote_url: Substring matched search string on repository remote URL. :type remote_url: str :param prev_key: Previous page key. :type prev_key: str @@ -939,7 +1010,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -956,58 +1027,44 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoList", + '200': "ExternalRepoList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - remote_url: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on repository remote URL."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + remote_url: Annotated[Optional[StrictStr], Field(description="Substring matched search string on repository remote URL.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1030,7 +1087,7 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param remote_url: Prefix matched search string on repository remote URL. + :param remote_url: Substring matched search string on repository remote URL. :type remote_url: str :param prev_key: Previous page key. :type prev_key: str @@ -1060,7 +1117,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1077,15 +1134,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepoList", + '200': "ExternalRepoList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -1107,75 +1168,86 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if remote_url is not None: - - _query_params.append(("remote_url", remote_url)) - + + _query_params.append(('remote_url', remote_url)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/external_repos", + method='GET', + resource_path='/api/external_repos', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1185,9 +1257,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1196,7 +1271,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1231,7 +1309,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_id=external_repo_id, @@ -1239,19 +1317,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepo", + '200': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1260,7 +1342,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1295,7 +1380,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_id=external_repo_id, @@ -1303,19 +1388,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepo", + '200': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1324,7 +1413,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1359,7 +1451,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_id=external_repo_id, @@ -1367,15 +1459,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ExternalRepo", + '200': "ExternalRepo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, external_repo_id, @@ -1388,18 +1484,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_id is not None: - _path_params["external_repo_id"] = external_repo_id + _path_params['external_repo_id'] = external_repo_id # process the query parameters # process the header parameters # process the form parameters @@ -1407,24 +1506,37 @@ def _update_serialize( if external_repo_update is not None: _body_params = external_repo_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/external_repos/{external_repo_id}", + method='PATCH', + resource_path='/api/external_repos/{external_repo_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1434,5 +1546,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/groups_api.py b/saturn_api/api/groups_api.py index b0198e2..f2b98cb 100644 --- a/saturn_api/api/groups_api.py +++ b/saturn_api/api/groups_api.py @@ -1,24 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.daily_usage_list import DailyUsageList from saturn_api.models.group import Group from saturn_api.models.group_create import GroupCreate @@ -27,6 +27,9 @@ from saturn_api.models.group_member_create import GroupMemberCreate from saturn_api.models.group_member_list import GroupMemberList from saturn_api.models.group_update import GroupUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -42,6 +45,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -49,7 +53,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,26 +89,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( group_create=group_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Group", + '201': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -109,7 +120,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -142,26 +156,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( group_create=group_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Group", + '201': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -169,7 +187,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -202,22 +223,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( group_create=group_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Group", + '201': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, group_create, @@ -229,13 +254,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -246,24 +274,37 @@ def _create_serialize( if group_create is not None: _body_params = group_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/groups", + method='POST', + resource_path='/api/groups', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -273,9 +314,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_member( self, @@ -284,7 +328,10 @@ async def create_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -318,7 +365,7 @@ async def create_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( group_id=group_id, @@ -326,19 +373,23 @@ async def create_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "GroupMember", + '201': "GroupMember", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_member_with_http_info( self, @@ -347,7 +398,10 @@ async def create_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -381,7 +435,7 @@ async def create_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( group_id=group_id, @@ -389,19 +443,23 @@ async def create_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "GroupMember", + '201': "GroupMember", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_member_without_preload_content( self, @@ -410,7 +468,10 @@ async def create_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -444,7 +505,7 @@ async def create_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( group_id=group_id, @@ -452,15 +513,19 @@ async def create_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "GroupMember", + '201': "GroupMember", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_member_serialize( self, group_id, @@ -473,18 +538,21 @@ def _create_member_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters # process the header parameters # process the form parameters @@ -492,24 +560,37 @@ def _create_member_serialize( if group_member_create is not None: _body_params = group_member_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/groups/{group_id}/members", + method='POST', + resource_path='/api/groups/{group_id}/members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -519,9 +600,12 @@ def _create_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -529,7 +613,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -562,26 +649,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -589,7 +680,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -622,26 +716,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -649,7 +747,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -682,22 +783,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, group_id, @@ -709,29 +814,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/groups/{group_id}", + method='DELETE', + resource_path='/api/groups/{group_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -741,9 +854,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_member( self, @@ -752,7 +868,10 @@ async def delete_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -786,7 +905,7 @@ async def delete_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( group_id=group_id, @@ -794,19 +913,23 @@ async def delete_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_member_with_http_info( self, @@ -815,7 +938,10 @@ async def delete_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -849,7 +975,7 @@ async def delete_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( group_id=group_id, @@ -857,19 +983,23 @@ async def delete_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_member_without_preload_content( self, @@ -878,7 +1008,10 @@ async def delete_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -912,7 +1045,7 @@ async def delete_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( group_id=group_id, @@ -920,15 +1053,19 @@ async def delete_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_member_serialize( self, group_id, @@ -941,33 +1078,41 @@ def _delete_member_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/groups/{group_id}/members", + method='DELETE', + resource_path='/api/groups/{group_id}/members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -977,9 +1122,12 @@ def _delete_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -987,7 +1135,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1020,26 +1171,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Group", + '200': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -1047,7 +1202,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1080,26 +1238,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Group", + '200': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -1107,7 +1269,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1140,22 +1305,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Group", + '200': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, group_id, @@ -1167,33 +1336,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/groups/{group_id}", + method='GET', + resource_path='/api/groups/{group_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1203,9 +1383,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_daily_usage( self, @@ -1215,7 +1398,10 @@ async def get_daily_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1252,7 +1438,7 @@ async def get_daily_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( group_id=group_id, @@ -1261,19 +1447,23 @@ async def get_daily_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_daily_usage_with_http_info( self, @@ -1283,7 +1473,10 @@ async def get_daily_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1320,7 +1513,7 @@ async def get_daily_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( group_id=group_id, @@ -1329,19 +1522,23 @@ async def get_daily_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_daily_usage_without_preload_content( self, @@ -1351,7 +1548,10 @@ async def get_daily_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1388,7 +1588,7 @@ async def get_daily_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( group_id=group_id, @@ -1397,15 +1597,19 @@ async def get_daily_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_daily_usage_serialize( self, group_id, @@ -1419,49 +1623,70 @@ def _get_daily_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/groups/{group_id}/usage/daily", + method='GET', + resource_path='/api/groups/{group_id}/usage/daily', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1471,40 +1696,29 @@ def _get_daily_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on group name.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], - Field( - description="Org ID to query for groups. Defaults to the default org for the authenticated user." - ), - ] = None, - all_groups: Annotated[ - Optional[StrictBool], - Field( - description="Search for all groups in the org, instead of only groups the authenticated user is a member of." - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group name.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Org ID to query for groups. Defaults to the default org for the authenticated user.")] = None, + all_groups: Annotated[Optional[StrictBool], Field(description="Search for all groups in the org, instead of only groups the authenticated user is a member of.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1515,7 +1729,7 @@ async def list( Paginated list of groups. - :param name: Prefix matched search string on group name. + :param name: Substring matched search string on group name. :type name: str :param org_id: Org ID to query for groups. Defaults to the default org for the authenticated user. :type org_id: str @@ -1549,7 +1763,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1562,50 +1776,40 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GroupList", + '200': "GroupList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on group name.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], - Field( - description="Org ID to query for groups. Defaults to the default org for the authenticated user." - ), - ] = None, - all_groups: Annotated[ - Optional[StrictBool], - Field( - description="Search for all groups in the org, instead of only groups the authenticated user is a member of." - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group name.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Org ID to query for groups. Defaults to the default org for the authenticated user.")] = None, + all_groups: Annotated[Optional[StrictBool], Field(description="Search for all groups in the org, instead of only groups the authenticated user is a member of.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1616,7 +1820,7 @@ async def list_with_http_info( Paginated list of groups. - :param name: Prefix matched search string on group name. + :param name: Substring matched search string on group name. :type name: str :param org_id: Org ID to query for groups. Defaults to the default org for the authenticated user. :type org_id: str @@ -1650,7 +1854,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1663,50 +1867,40 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GroupList", + '200': "GroupList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on group name.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], - Field( - description="Org ID to query for groups. Defaults to the default org for the authenticated user." - ), - ] = None, - all_groups: Annotated[ - Optional[StrictBool], - Field( - description="Search for all groups in the org, instead of only groups the authenticated user is a member of." - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group name.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Org ID to query for groups. Defaults to the default org for the authenticated user.")] = None, + all_groups: Annotated[Optional[StrictBool], Field(description="Search for all groups in the org, instead of only groups the authenticated user is a member of.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1717,7 +1911,7 @@ async def list_without_preload_content( Paginated list of groups. - :param name: Prefix matched search string on group name. + :param name: Substring matched search string on group name. :type name: str :param org_id: Org ID to query for groups. Defaults to the default org for the authenticated user. :type org_id: str @@ -1751,7 +1945,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1764,15 +1958,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GroupList", + '200': "GroupList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, name, @@ -1790,59 +1988,70 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if all_groups is not None: - - _query_params.append(("all_groups", all_groups)) - + + _query_params.append(('all_groups', all_groups)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/groups", + method='GET', + resource_path='/api/groups', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1852,30 +2061,28 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_members( self, group_id: StrictStr, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on group member username."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group member username.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1887,7 +2094,7 @@ async def list_members( :param group_id: (required) :type group_id: str - :param name: Prefix matched search string on group member username. + :param name: Substring matched search string on group member username. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -1917,7 +2124,7 @@ async def list_members( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_members_serialize( group_id=group_id, @@ -1929,40 +2136,39 @@ async def list_members( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GroupMemberList", + '200': "GroupMemberList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_members_with_http_info( self, group_id: StrictStr, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on group member username."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group member username.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1974,7 +2180,7 @@ async def list_members_with_http_info( :param group_id: (required) :type group_id: str - :param name: Prefix matched search string on group member username. + :param name: Substring matched search string on group member username. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -2004,7 +2210,7 @@ async def list_members_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_members_serialize( group_id=group_id, @@ -2016,40 +2222,39 @@ async def list_members_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GroupMemberList", + '200': "GroupMemberList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_members_without_preload_content( self, group_id: StrictStr, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on group member username."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group member username.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2061,7 +2266,7 @@ async def list_members_without_preload_content( :param group_id: (required) :type group_id: str - :param name: Prefix matched search string on group member username. + :param name: Substring matched search string on group member username. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -2091,7 +2296,7 @@ async def list_members_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_members_serialize( group_id=group_id, @@ -2103,15 +2308,19 @@ async def list_members_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GroupMemberList", + '200': "GroupMemberList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_members_serialize( self, group_id, @@ -2128,53 +2337,64 @@ def _list_members_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/groups/{group_id}/members", + method='GET', + resource_path='/api/groups/{group_id}/members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2184,9 +2404,12 @@ def _list_members_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -2195,7 +2418,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2230,7 +2456,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( group_id=group_id, @@ -2238,19 +2464,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Group", + '200': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -2259,7 +2489,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2294,7 +2527,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( group_id=group_id, @@ -2302,19 +2535,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Group", + '200': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -2323,7 +2560,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2358,7 +2598,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( group_id=group_id, @@ -2366,15 +2606,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Group", + '200': "Group", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, group_id, @@ -2387,18 +2631,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params["group_id"] = group_id + _path_params['group_id'] = group_id # process the query parameters # process the header parameters # process the form parameters @@ -2406,24 +2653,37 @@ def _update_serialize( if group_update is not None: _body_params = group_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/groups/{group_id}", + method='PATCH', + resource_path='/api/groups/{group_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2433,5 +2693,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/image_tags_api.py b/saturn_api/api/image_tags_api.py index 00c2dc3..279b42c 100644 --- a/saturn_api/api/image_tags_api.py +++ b/saturn_api/api/image_tags_api.py @@ -1,23 +1,23 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.image_build_status import ImageBuildStatus from saturn_api.models.image_tag import ImageTag @@ -26,6 +26,9 @@ from saturn_api.models.image_tag_update import ImageTagUpdate from saturn_api.models.job_runtime_summary import JobRuntimeSummary from saturn_api.models.resource_history import ResourceHistory + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -41,6 +44,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -49,7 +53,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,7 +91,7 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_id=image_id, @@ -92,19 +99,23 @@ async def create( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ImageTag", + '201': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -113,7 +124,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,7 +162,7 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_id=image_id, @@ -156,19 +170,23 @@ async def create_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ImageTag", + '201': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -177,7 +195,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -212,7 +233,7 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_id=image_id, @@ -220,15 +241,19 @@ async def create_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ImageTag", + '201': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, image_id, @@ -241,18 +266,21 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id # process the query parameters # process the header parameters # process the form parameters @@ -260,24 +288,37 @@ def _create_serialize( if image_tag_create is not None: _body_params = image_tag_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/images/{image_id}/tags", + method='POST', + resource_path='/api/images/{image_id}/tags', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -287,9 +328,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -298,7 +342,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -333,7 +380,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, @@ -341,19 +388,23 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -362,7 +413,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -397,7 +451,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, @@ -405,19 +459,23 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -426,7 +484,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -461,7 +522,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, @@ -469,15 +530,19 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, image_id, @@ -490,31 +555,39 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/images/{image_id}/tags/{image_tag_id}", + method='DELETE', + resource_path='/api/images/{image_id}/tags/{image_tag_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -524,9 +597,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -535,7 +611,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -570,7 +649,7 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, @@ -578,19 +657,23 @@ async def get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -599,7 +682,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -634,7 +720,7 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, @@ -642,19 +728,23 @@ async def get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -663,7 +753,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -698,7 +791,7 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, @@ -706,15 +799,19 @@ async def get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, image_id, @@ -727,35 +824,46 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images/{image_id}/tags/{image_tag_id}", + method='GET', + resource_path='/api/images/{image_id}/tags/{image_tag_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -765,30 +873,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_logs( self, image_id: StrictStr, image_tag_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -833,7 +940,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( image_id=image_id, @@ -846,40 +953,40 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_logs_with_http_info( self, image_id: StrictStr, image_tag_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -924,7 +1031,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( image_id=image_id, @@ -937,40 +1044,40 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_logs_without_preload_content( self, image_id: StrictStr, image_tag_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1015,7 +1122,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( image_id=image_id, @@ -1028,15 +1135,19 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_logs_serialize( self, image_id, @@ -1054,55 +1165,66 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters if pod_name is not None: - - _query_params.append(("pod_name", pod_name)) - + + _query_params.append(('pod_name', pod_name)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images/{image_id}/tags/{image_tag_id}/logs", + method='GET', + resource_path='/api/images/{image_id}/tags/{image_tag_id}/logs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1112,9 +1234,12 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_runtime_summary( self, @@ -1123,7 +1248,10 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1158,7 +1286,7 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( image_id=image_id, @@ -1166,19 +1294,23 @@ async def get_runtime_summary( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRuntimeSummary", + '200': "JobRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_runtime_summary_with_http_info( self, @@ -1187,7 +1319,10 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1222,7 +1357,7 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( image_id=image_id, @@ -1230,19 +1365,23 @@ async def get_runtime_summary_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRuntimeSummary", + '200': "JobRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_runtime_summary_without_preload_content( self, @@ -1251,7 +1390,10 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1286,7 +1428,7 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( image_id=image_id, @@ -1294,15 +1436,19 @@ async def get_runtime_summary_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRuntimeSummary", + '200': "JobRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_runtime_summary_serialize( self, image_id, @@ -1315,35 +1461,46 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images/{image_id}/tags/{image_tag_id}/runtimesummary", + method='GET', + resource_path='/api/images/{image_id}/tags/{image_tag_id}/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1353,9 +1510,12 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_status_history( self, @@ -1364,7 +1524,10 @@ async def get_status_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1398,7 +1561,7 @@ async def get_status_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_status_history_serialize( image_id=image_id, @@ -1406,19 +1569,23 @@ async def get_status_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_status_history_with_http_info( self, @@ -1427,7 +1594,10 @@ async def get_status_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1461,7 +1631,7 @@ async def get_status_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_status_history_serialize( image_id=image_id, @@ -1469,19 +1639,23 @@ async def get_status_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_status_history_without_preload_content( self, @@ -1490,7 +1664,10 @@ async def get_status_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1524,7 +1701,7 @@ async def get_status_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_status_history_serialize( image_id=image_id, @@ -1532,15 +1709,19 @@ async def get_status_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_status_history_serialize( self, image_id, @@ -1553,35 +1734,46 @@ def _get_status_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images/{image_id}/tags/{image_tag_id}/history", + method='GET', + resource_path='/api/images/{image_id}/tags/{image_tag_id}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1591,42 +1783,32 @@ def _get_status_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, image_id: StrictStr, - version: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on image tag version."), - ] = None, - image_uri: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on image tag URI.") - ] = None, - is_external: Annotated[ - Optional[StrictBool], Field(description="Filter image tags by is_external.") - ] = None, - archived: Annotated[ - Optional[StrictBool], Field(description="Filter images tags by archived.") - ] = None, - status: Annotated[ - Optional[ImageBuildStatus], Field(description="Filter image tags by build status.") - ] = None, + version: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag version.")] = None, + image_uri: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag URI.")] = None, + is_external: Annotated[Optional[StrictBool], Field(description="Filter image tags by is_external.")] = None, + archived: Annotated[Optional[StrictBool], Field(description="Filter images tags by archived.")] = None, + status: Annotated[Optional[ImageBuildStatus], Field(description="Filter image tags by build status.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1639,9 +1821,9 @@ async def list( :param image_id: (required) :type image_id: str - :param version: Prefix matched search string on image tag version. + :param version: Substring matched search string on image tag version. :type version: str - :param image_uri: Prefix matched search string on image tag URI. + :param image_uri: Substring matched search string on image tag URI. :type image_uri: str :param is_external: Filter image tags by is_external. :type is_external: bool @@ -1677,7 +1859,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( image_id=image_id, @@ -1693,52 +1875,43 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTagList", + '200': "ImageTagList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, image_id: StrictStr, - version: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on image tag version."), - ] = None, - image_uri: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on image tag URI.") - ] = None, - is_external: Annotated[ - Optional[StrictBool], Field(description="Filter image tags by is_external.") - ] = None, - archived: Annotated[ - Optional[StrictBool], Field(description="Filter images tags by archived.") - ] = None, - status: Annotated[ - Optional[ImageBuildStatus], Field(description="Filter image tags by build status.") - ] = None, + version: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag version.")] = None, + image_uri: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag URI.")] = None, + is_external: Annotated[Optional[StrictBool], Field(description="Filter image tags by is_external.")] = None, + archived: Annotated[Optional[StrictBool], Field(description="Filter images tags by archived.")] = None, + status: Annotated[Optional[ImageBuildStatus], Field(description="Filter image tags by build status.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1751,9 +1924,9 @@ async def list_with_http_info( :param image_id: (required) :type image_id: str - :param version: Prefix matched search string on image tag version. + :param version: Substring matched search string on image tag version. :type version: str - :param image_uri: Prefix matched search string on image tag URI. + :param image_uri: Substring matched search string on image tag URI. :type image_uri: str :param is_external: Filter image tags by is_external. :type is_external: bool @@ -1789,7 +1962,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( image_id=image_id, @@ -1805,52 +1978,43 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTagList", + '200': "ImageTagList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, image_id: StrictStr, - version: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on image tag version."), - ] = None, - image_uri: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on image tag URI.") - ] = None, - is_external: Annotated[ - Optional[StrictBool], Field(description="Filter image tags by is_external.") - ] = None, - archived: Annotated[ - Optional[StrictBool], Field(description="Filter images tags by archived.") - ] = None, - status: Annotated[ - Optional[ImageBuildStatus], Field(description="Filter image tags by build status.") - ] = None, + version: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag version.")] = None, + image_uri: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag URI.")] = None, + is_external: Annotated[Optional[StrictBool], Field(description="Filter image tags by is_external.")] = None, + archived: Annotated[Optional[StrictBool], Field(description="Filter images tags by archived.")] = None, + status: Annotated[Optional[ImageBuildStatus], Field(description="Filter image tags by build status.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1863,9 +2027,9 @@ async def list_without_preload_content( :param image_id: (required) :type image_id: str - :param version: Prefix matched search string on image tag version. + :param version: Substring matched search string on image tag version. :type version: str - :param image_uri: Prefix matched search string on image tag URI. + :param image_uri: Substring matched search string on image tag URI. :type image_uri: str :param is_external: Filter image tags by is_external. :type is_external: bool @@ -1901,7 +2065,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( image_id=image_id, @@ -1917,15 +2081,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTagList", + '200': "ImageTagList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, image_id, @@ -1946,69 +2114,80 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id # process the query parameters if version is not None: - - _query_params.append(("version", version)) - + + _query_params.append(('version', version)) + if image_uri is not None: - - _query_params.append(("image_uri", image_uri)) - + + _query_params.append(('image_uri', image_uri)) + if is_external is not None: - - _query_params.append(("is_external", is_external)) - + + _query_params.append(('is_external', is_external)) + if archived is not None: - - _query_params.append(("archived", archived)) - + + _query_params.append(('archived', archived)) + if status is not None: - - _query_params.append(("status", status.value)) - + + _query_params.append(('status', status.value)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images/{image_id}/tags", + method='GET', + resource_path='/api/images/{image_id}/tags', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2018,9 +2197,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def stop( self, @@ -2029,7 +2211,10 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2063,7 +2248,7 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( image_id=image_id, @@ -2071,19 +2256,23 @@ async def stop( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def stop_with_http_info( self, @@ -2092,7 +2281,10 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2126,7 +2318,7 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( image_id=image_id, @@ -2134,19 +2326,23 @@ async def stop_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def stop_without_preload_content( self, @@ -2155,7 +2351,10 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2189,7 +2388,7 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( image_id=image_id, @@ -2197,15 +2396,19 @@ async def stop_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _stop_serialize( self, image_id, @@ -2218,35 +2421,46 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/images/{image_id}/tags/{image_tag_id}/stop", + method='POST', + resource_path='/api/images/{image_id}/tags/{image_tag_id}/stop', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2256,9 +2470,12 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -2268,7 +2485,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2305,7 +2525,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -2314,19 +2534,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -2336,7 +2560,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2373,7 +2600,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -2382,19 +2609,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -2404,7 +2635,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2441,7 +2675,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -2450,15 +2684,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageTag", + '200': "ImageTag", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, image_id, @@ -2472,20 +2710,23 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id if image_tag_id is not None: - _path_params["image_tag_id"] = image_tag_id + _path_params['image_tag_id'] = image_tag_id # process the query parameters # process the header parameters # process the form parameters @@ -2493,24 +2734,37 @@ def _update_serialize( if image_tag_update is not None: _body_params = image_tag_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/images/{image_id}/tags/{image_tag_id}", + method='PATCH', + resource_path='/api/images/{image_id}/tags/{image_tag_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2520,5 +2774,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/images_api.py b/saturn_api/api/images_api.py index 32ece47..7a2f421 100644 --- a/saturn_api/api/images_api.py +++ b/saturn_api/api/images_api.py @@ -1,37 +1,32 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image import Image from saturn_api.models.image_access_level import ImageAccessLevel from saturn_api.models.image_create import ImageCreate from saturn_api.models.image_list import ImageList from saturn_api.models.image_update import ImageUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -47,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -54,7 +50,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,26 +86,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_create=image_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Image", + '201': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -114,7 +117,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,26 +153,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_create=image_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Image", + '201': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -174,7 +184,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -207,22 +220,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_create=image_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Image", + '201': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, image_create, @@ -234,13 +251,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -251,24 +271,37 @@ def _create_serialize( if image_create is not None: _body_params = image_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/images", + method='POST', + resource_path='/api/images', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -278,9 +311,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -288,7 +324,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -321,26 +360,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -348,7 +391,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -381,26 +427,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -408,7 +458,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -441,22 +494,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, image_id, @@ -468,29 +525,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/images/{image_id}", + method='DELETE', + resource_path='/api/images/{image_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -500,9 +565,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -510,7 +578,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -543,26 +614,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + '200': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -570,7 +645,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -603,26 +681,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + '200': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -630,7 +712,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -663,22 +748,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + '200': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, image_id, @@ -690,33 +779,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images/{image_id}", + method='GET', + resource_path='/api/images/{image_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -726,60 +826,37 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on image name.") - ] = None, - access: Annotated[ - Optional[ImageAccessLevel], Field(description="Filter images by access level.") - ] = None, - supports: Annotated[ - Optional[StrictStr], Field(description="Filter images by supported features.") - ] = None, - hardware_type: Annotated[ - Optional[HardwareType], Field(description="Filter images by hardware type.") - ] = None, - is_base: Annotated[ - Optional[StrictBool], - Field(description="Filter for images that are or are not base images."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image name.")] = None, + access: Annotated[Optional[ImageAccessLevel], Field(description="Filter images by access level.")] = None, + supports: Annotated[Optional[StrictStr], Field(description="Filter images by supported features.")] = None, + hardware_type: Annotated[Optional[HardwareType], Field(description="Filter images by hardware type.")] = None, + is_base: Annotated[Optional[StrictBool], Field(description="Filter for images that are or are not base images.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -802,7 +879,7 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on image name. + :param name: Substring matched search string on image name. :type name: str :param access: Filter images by access level. :type access: ImageAccessLevel @@ -840,7 +917,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -861,70 +938,48 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageList", + '200': "ImageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on image name.") - ] = None, - access: Annotated[ - Optional[ImageAccessLevel], Field(description="Filter images by access level.") - ] = None, - supports: Annotated[ - Optional[StrictStr], Field(description="Filter images by supported features.") - ] = None, - hardware_type: Annotated[ - Optional[HardwareType], Field(description="Filter images by hardware type.") - ] = None, - is_base: Annotated[ - Optional[StrictBool], - Field(description="Filter for images that are or are not base images."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image name.")] = None, + access: Annotated[Optional[ImageAccessLevel], Field(description="Filter images by access level.")] = None, + supports: Annotated[Optional[StrictStr], Field(description="Filter images by supported features.")] = None, + hardware_type: Annotated[Optional[HardwareType], Field(description="Filter images by hardware type.")] = None, + is_base: Annotated[Optional[StrictBool], Field(description="Filter for images that are or are not base images.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -947,7 +1002,7 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on image name. + :param name: Substring matched search string on image name. :type name: str :param access: Filter images by access level. :type access: ImageAccessLevel @@ -985,7 +1040,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1006,70 +1061,48 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageList", + '200': "ImageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on image name.") - ] = None, - access: Annotated[ - Optional[ImageAccessLevel], Field(description="Filter images by access level.") - ] = None, - supports: Annotated[ - Optional[StrictStr], Field(description="Filter images by supported features.") - ] = None, - hardware_type: Annotated[ - Optional[HardwareType], Field(description="Filter images by hardware type.") - ] = None, - is_base: Annotated[ - Optional[StrictBool], - Field(description="Filter for images that are or are not base images."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image name.")] = None, + access: Annotated[Optional[ImageAccessLevel], Field(description="Filter images by access level.")] = None, + supports: Annotated[Optional[StrictStr], Field(description="Filter images by supported features.")] = None, + hardware_type: Annotated[Optional[HardwareType], Field(description="Filter images by hardware type.")] = None, + is_base: Annotated[Optional[StrictBool], Field(description="Filter for images that are or are not base images.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1092,7 +1125,7 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on image name. + :param name: Substring matched search string on image name. :type name: str :param access: Filter images by access level. :type access: ImageAccessLevel @@ -1130,7 +1163,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1151,15 +1184,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageList", + '200': "ImageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -1185,91 +1222,102 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if access is not None: - - _query_params.append(("access", access.value)) - + + _query_params.append(('access', access.value)) + if supports is not None: - - _query_params.append(("supports", supports)) - + + _query_params.append(('supports', supports)) + if hardware_type is not None: - - _query_params.append(("hardware_type", hardware_type.value)) - + + _query_params.append(('hardware_type', hardware_type.value)) + if is_base is not None: - - _query_params.append(("is_base", is_base)) - + + _query_params.append(('is_base', is_base)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/images", + method='GET', + resource_path='/api/images', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1279,9 +1327,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1290,7 +1341,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1325,7 +1379,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -1333,19 +1387,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + '200': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1354,7 +1412,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1389,7 +1450,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -1397,19 +1458,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + '200': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1418,7 +1483,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1453,7 +1521,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -1461,15 +1529,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + '200': "Image", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, image_id, @@ -1482,18 +1554,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params["image_id"] = image_id + _path_params['image_id'] = image_id # process the query parameters # process the header parameters # process the form parameters @@ -1501,24 +1576,37 @@ def _update_serialize( if image_update is not None: _body_params = image_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/images/{image_id}", + method='PATCH', + resource_path='/api/images/{image_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1528,5 +1616,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/info_api.py b/saturn_api/api/info_api.py index 8d0b38e..2b7c1d1 100644 --- a/saturn_api/api/info_api.py +++ b/saturn_api/api/info_api.py @@ -1,25 +1,25 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.models.app_info import AppInfo from saturn_api.models.server_options import ServerOptions + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -35,13 +35,17 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -72,32 +76,39 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AppInfo", + '200': "AppInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -128,32 +139,39 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AppInfo", + '200': "AppInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -184,21 +202,25 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AppInfo", + '200': "AppInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, _request_auth, @@ -209,13 +231,16 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -224,16 +249,24 @@ def _get_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/info", + method='GET', + resource_path='/api/info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -243,16 +276,22 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -283,32 +322,39 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerOptions", + '200': "ServerOptions", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -339,32 +385,39 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerOptions", + '200': "ServerOptions", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -395,21 +448,25 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerOptions", + '200': "ServerOptions", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_server_options_serialize( self, _request_auth, @@ -420,13 +477,16 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -435,16 +495,24 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/info/servers", + method='GET', + resource_path='/api/info/servers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -454,5 +522,7 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/invitations_api.py b/saturn_api/api/invitations_api.py index 2b441b7..568e89b 100644 --- a/saturn_api/api/invitations_api.py +++ b/saturn_api/api/invitations_api.py @@ -1,28 +1,31 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.invitation import Invitation from saturn_api.models.invitation_create import InvitationCreate from saturn_api.models.invitation_list import InvitationList from saturn_api.models.invitation_status import InvitationStatus from saturn_api.models.invitation_update import InvitationUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -38,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -45,7 +49,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -78,26 +85,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( invitation_create=invitation_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Invitation", + '201': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -105,7 +116,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -138,26 +152,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( invitation_create=invitation_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Invitation", + '201': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -165,7 +183,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -198,22 +219,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( invitation_create=invitation_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Invitation", + '201': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, invitation_create, @@ -225,13 +250,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -242,24 +270,37 @@ def _create_serialize( if invitation_create is not None: _body_params = invitation_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/invitations", + method='POST', + resource_path='/api/invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -269,9 +310,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -279,7 +323,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -312,26 +359,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -339,7 +390,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -372,26 +426,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -399,7 +457,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -432,22 +493,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, invitation_id, @@ -459,29 +524,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if invitation_id is not None: - _path_params["invitation_id"] = invitation_id + _path_params['invitation_id'] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/invitations/{invitation_id}", + method='DELETE', + resource_path='/api/invitations/{invitation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -491,9 +564,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -501,7 +577,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -534,26 +613,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Invitation", + '200': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -561,7 +644,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -594,26 +680,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Invitation", + '200': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -621,7 +711,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -654,22 +747,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Invitation", + '200': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, invitation_id, @@ -681,33 +778,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if invitation_id is not None: - _path_params["invitation_id"] = invitation_id + _path_params['invitation_id'] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/invitations/{invitation_id}", + method='GET', + resource_path='/api/invitations/{invitation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -717,34 +825,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - status: Annotated[ - Optional[InvitationStatus], Field(description="Filter invitations by status.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on email.") - ] = None, - invitor_id: Annotated[ - Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") - ] = None, + status: Annotated[Optional[InvitationStatus], Field(description="Filter invitations by status.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, + invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -757,7 +860,7 @@ async def list( :param status: Filter invitations by status. :type status: InvitationStatus - :param email: Prefix matched search string on email. + :param email: Substring matched search string on email. :type email: str :param invitor_id: Filter invitations by invitor user ID. :type invitor_id: str @@ -789,7 +892,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( status=status, @@ -802,44 +905,40 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "InvitationList", + '200': "InvitationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - status: Annotated[ - Optional[InvitationStatus], Field(description="Filter invitations by status.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on email.") - ] = None, - invitor_id: Annotated[ - Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") - ] = None, + status: Annotated[Optional[InvitationStatus], Field(description="Filter invitations by status.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, + invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -852,7 +951,7 @@ async def list_with_http_info( :param status: Filter invitations by status. :type status: InvitationStatus - :param email: Prefix matched search string on email. + :param email: Substring matched search string on email. :type email: str :param invitor_id: Filter invitations by invitor user ID. :type invitor_id: str @@ -884,7 +983,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( status=status, @@ -897,44 +996,40 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "InvitationList", + '200': "InvitationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - status: Annotated[ - Optional[InvitationStatus], Field(description="Filter invitations by status.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on email.") - ] = None, - invitor_id: Annotated[ - Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") - ] = None, + status: Annotated[Optional[InvitationStatus], Field(description="Filter invitations by status.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, + invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -947,7 +1042,7 @@ async def list_without_preload_content( :param status: Filter invitations by status. :type status: InvitationStatus - :param email: Prefix matched search string on email. + :param email: Substring matched search string on email. :type email: str :param invitor_id: Filter invitations by invitor user ID. :type invitor_id: str @@ -979,7 +1074,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( status=status, @@ -992,15 +1087,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "InvitationList", + '200': "InvitationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, status, @@ -1018,59 +1117,70 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if status is not None: - - _query_params.append(("status", status.value)) - + + _query_params.append(('status', status.value)) + if email is not None: - - _query_params.append(("email", email)) - + + _query_params.append(('email', email)) + if invitor_id is not None: - - _query_params.append(("invitor_id", invitor_id)) - + + _query_params.append(('invitor_id', invitor_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/invitations", + method='GET', + resource_path='/api/invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1080,9 +1190,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1091,7 +1204,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1126,7 +1242,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( invitation_id=invitation_id, @@ -1134,19 +1250,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Invitation", + '200': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1155,7 +1275,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1190,7 +1313,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( invitation_id=invitation_id, @@ -1198,19 +1321,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Invitation", + '200': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1219,7 +1346,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1254,7 +1384,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( invitation_id=invitation_id, @@ -1262,15 +1392,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Invitation", + '200': "Invitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, invitation_id, @@ -1283,18 +1417,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if invitation_id is not None: - _path_params["invitation_id"] = invitation_id + _path_params['invitation_id'] = invitation_id # process the query parameters # process the header parameters # process the form parameters @@ -1302,24 +1439,37 @@ def _update_serialize( if invitation_update is not None: _body_params = invitation_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/invitations/{invitation_id}", + method='PATCH', + resource_path='/api/invitations/{invitation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1329,5 +1479,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/jobs_api.py b/saturn_api/api/jobs_api.py index 8488bd3..711cc49 100644 --- a/saturn_api/api/jobs_api.py +++ b/saturn_api/api/jobs_api.py @@ -1,32 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.cron_schedule_update import CronScheduleUpdate from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.job import Job @@ -50,9 +42,10 @@ from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate from saturn_api.models.service_account_attachment import ServiceAccountAttachment -from saturn_api.models.service_account_create_attachment import ( - ServiceAccountCreateAttachment, -) +from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -68,6 +61,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -75,7 +69,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -108,26 +105,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( job_create=job_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Job", + '201': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -135,7 +136,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -168,26 +172,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( job_create=job_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Job", + '201': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -195,7 +203,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -228,22 +239,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( job_create=job_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Job", + '201': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, job_create, @@ -255,13 +270,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -272,24 +290,37 @@ def _create_serialize( if job_create is not None: _body_params = job_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs", + method='POST', + resource_path='/api/jobs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -299,9 +330,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_resource_template( self, @@ -309,7 +343,10 @@ async def create_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,26 +378,30 @@ async def create_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_resource_template_with_http_info( self, @@ -368,7 +409,10 @@ async def create_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -400,26 +444,30 @@ async def create_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_resource_template_without_preload_content( self, @@ -427,7 +475,10 @@ async def create_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -459,22 +510,26 @@ async def create_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_resource_template_serialize( self, job_id, @@ -486,33 +541,44 @@ def _create_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/template", + method='POST', + resource_path='/api/jobs/{job_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -522,9 +588,12 @@ def _create_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_secret_attachment( self, @@ -533,7 +602,10 @@ async def create_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -567,7 +639,7 @@ async def create_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( job_id=job_id, @@ -575,19 +647,23 @@ async def create_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_secret_attachment_with_http_info( self, @@ -596,7 +672,10 @@ async def create_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -630,7 +709,7 @@ async def create_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( job_id=job_id, @@ -638,19 +717,23 @@ async def create_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_secret_attachment_without_preload_content( self, @@ -659,7 +742,10 @@ async def create_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -693,7 +779,7 @@ async def create_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( job_id=job_id, @@ -701,15 +787,19 @@ async def create_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_secret_attachment_serialize( self, job_id, @@ -722,18 +812,21 @@ def _create_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -741,24 +834,37 @@ def _create_secret_attachment_serialize( if secret_attachment_create is not None: _body_params = secret_attachment_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/secrets", + method='POST', + resource_path='/api/jobs/{job_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -768,9 +874,12 @@ def _create_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_service_account_attachment( self, @@ -779,7 +888,10 @@ async def create_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -813,7 +925,7 @@ async def create_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( job_id=job_id, @@ -821,19 +933,23 @@ async def create_service_account_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_service_account_attachment_with_http_info( self, @@ -842,7 +958,10 @@ async def create_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -876,7 +995,7 @@ async def create_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( job_id=job_id, @@ -884,19 +1003,23 @@ async def create_service_account_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_service_account_attachment_without_preload_content( self, @@ -905,7 +1028,10 @@ async def create_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -939,7 +1065,7 @@ async def create_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( job_id=job_id, @@ -947,15 +1073,19 @@ async def create_service_account_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_service_account_attachment_serialize( self, job_id, @@ -968,18 +1098,21 @@ def _create_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -987,24 +1120,37 @@ def _create_service_account_attachment_serialize( if service_account_create_attachment is not None: _body_params = service_account_create_attachment + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/api/jobs/{job_id}/service_account", + method='PUT', + resource_path='/api/jobs/{job_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1014,20 +1160,24 @@ def _create_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, job_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], Field(description="Force delete job that is currently active.") - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete job that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1062,7 +1212,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( job_id=job_id, @@ -1070,30 +1220,35 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, job_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], Field(description="Force delete job that is currently active.") - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete job that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1128,7 +1283,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( job_id=job_id, @@ -1136,30 +1291,35 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, job_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], Field(description="Force delete job that is currently active.") - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete job that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1194,7 +1354,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( job_id=job_id, @@ -1202,15 +1362,19 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, job_id, @@ -1223,33 +1387,41 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if allow_active is not None: - - _query_params.append(("allow_active", allow_active)) - + + _query_params.append(('allow_active', allow_active)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/jobs/{job_id}", + method='DELETE', + resource_path='/api/jobs/{job_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1259,9 +1431,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_secret_attachment( self, @@ -1270,7 +1445,10 @@ async def delete_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1304,7 +1482,7 @@ async def delete_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( job_id=job_id, @@ -1312,19 +1490,23 @@ async def delete_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_secret_attachment_with_http_info( self, @@ -1333,7 +1515,10 @@ async def delete_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1367,7 +1552,7 @@ async def delete_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( job_id=job_id, @@ -1375,19 +1560,23 @@ async def delete_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_secret_attachment_without_preload_content( self, @@ -1396,7 +1585,10 @@ async def delete_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1430,7 +1622,7 @@ async def delete_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( job_id=job_id, @@ -1438,15 +1630,19 @@ async def delete_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_secret_attachment_serialize( self, job_id, @@ -1459,31 +1655,39 @@ def _delete_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/jobs/{job_id}/secrets/{secret_attachment_id}", + method='DELETE', + resource_path='/api/jobs/{job_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1493,9 +1697,12 @@ def _delete_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_service_account_attachment( self, @@ -1503,7 +1710,10 @@ async def delete_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1535,26 +1745,30 @@ async def delete_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_service_account_attachment_with_http_info( self, @@ -1562,7 +1776,10 @@ async def delete_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1594,26 +1811,30 @@ async def delete_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_service_account_attachment_without_preload_content( self, @@ -1621,7 +1842,10 @@ async def delete_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1653,22 +1877,26 @@ async def delete_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_service_account_attachment_serialize( self, job_id, @@ -1680,29 +1908,37 @@ def _delete_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/jobs/{job_id}/service_account", + method='DELETE', + resource_path='/api/jobs/{job_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1712,9 +1948,12 @@ def _delete_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -1722,7 +1961,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1755,26 +1997,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -1782,7 +2028,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1815,26 +2064,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -1842,7 +2095,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1875,22 +2131,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, job_id, @@ -1902,33 +2162,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}", + method='GET', + resource_path='/api/jobs/{job_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1938,9 +2209,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_cluster_history( self, @@ -1948,7 +2222,10 @@ async def get_cluster_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1981,26 +2258,30 @@ async def get_cluster_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_cluster_history_with_http_info( self, @@ -2008,7 +2289,10 @@ async def get_cluster_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2041,26 +2325,30 @@ async def get_cluster_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_cluster_history_without_preload_content( self, @@ -2068,7 +2356,10 @@ async def get_cluster_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2101,22 +2392,26 @@ async def get_cluster_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_cluster_history_serialize( self, job_id, @@ -2128,33 +2423,44 @@ def _get_cluster_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/clusters", + method='GET', + resource_path='/api/jobs/{job_id}/clusters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2164,29 +2470,28 @@ def _get_cluster_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_logs( self, job_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2229,7 +2534,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( job_id=job_id, @@ -2241,39 +2546,39 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_logs_with_http_info( self, job_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2316,7 +2621,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( job_id=job_id, @@ -2328,39 +2633,39 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_logs_without_preload_content( self, job_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2403,7 +2708,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( job_id=job_id, @@ -2415,15 +2720,19 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_logs_serialize( self, job_id, @@ -2440,53 +2749,64 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if pod_name is not None: - - _query_params.append(("pod_name", pod_name)) - + + _query_params.append(('pod_name', pod_name)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/logs", + method='GET', + resource_path='/api/jobs/{job_id}/logs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2496,32 +2816,28 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_metrics( self, job_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2564,7 +2880,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( job_id=job_id, @@ -2576,42 +2892,39 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_metrics_with_http_info( self, job_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2654,7 +2967,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( job_id=job_id, @@ -2666,42 +2979,39 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_metrics_without_preload_content( self, job_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2744,7 +3054,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( job_id=job_id, @@ -2756,15 +3066,19 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_metrics_serialize( self, job_id, @@ -2781,61 +3095,82 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if type is not None: - - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if resolution is not None: - - _query_params.append(("resolution", resolution)) - + + _query_params.append(('resolution', resolution)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/metrics", + method='GET', + resource_path='/api/jobs/{job_id}/metrics', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2845,20 +3180,24 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_pod_history( self, job_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2893,7 +3232,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( job_id=job_id, @@ -2901,30 +3240,35 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_pod_history_with_http_info( self, job_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2959,7 +3303,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( job_id=job_id, @@ -2967,30 +3311,35 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_pod_history_without_preload_content( self, job_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3025,7 +3374,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( job_id=job_id, @@ -3033,15 +3382,19 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_pod_history_serialize( self, job_id, @@ -3054,37 +3407,48 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/history", + method='GET', + resource_path='/api/jobs/{job_id}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3094,9 +3458,12 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_recipe( self, @@ -3105,7 +3472,10 @@ async def get_recipe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3139,7 +3509,7 @@ async def get_recipe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( job_id=job_id, @@ -3147,19 +3517,23 @@ async def get_recipe( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRecipe", + '200': "JobRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_recipe_with_http_info( self, @@ -3168,7 +3542,10 @@ async def get_recipe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3202,7 +3579,7 @@ async def get_recipe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( job_id=job_id, @@ -3210,19 +3587,23 @@ async def get_recipe_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRecipe", + '200': "JobRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_recipe_without_preload_content( self, @@ -3231,7 +3612,10 @@ async def get_recipe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3265,7 +3649,7 @@ async def get_recipe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( job_id=job_id, @@ -3273,15 +3657,19 @@ async def get_recipe_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRecipe", + '200': "JobRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_recipe_serialize( self, job_id, @@ -3294,37 +3682,48 @@ def _get_recipe_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if as_template is not None: - - _query_params.append(("as_template", as_template)) - + + _query_params.append(('as_template', as_template)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/recipe", + method='GET', + resource_path='/api/jobs/{job_id}/recipe', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3334,9 +3733,12 @@ def _get_recipe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_resource_template( self, @@ -3344,7 +3746,10 @@ async def get_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3376,26 +3781,30 @@ async def get_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_resource_template_with_http_info( self, @@ -3403,7 +3812,10 @@ async def get_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3435,26 +3847,30 @@ async def get_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_resource_template_without_preload_content( self, @@ -3462,7 +3878,10 @@ async def get_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3494,22 +3913,26 @@ async def get_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_resource_template_serialize( self, job_id, @@ -3521,33 +3944,44 @@ def _get_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/template", + method='GET', + resource_path='/api/jobs/{job_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3557,9 +3991,12 @@ def _get_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_secret_attachment( self, @@ -3568,7 +4005,10 @@ async def get_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3602,7 +4042,7 @@ async def get_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( job_id=job_id, @@ -3610,19 +4050,23 @@ async def get_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_secret_attachment_with_http_info( self, @@ -3631,7 +4075,10 @@ async def get_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3665,7 +4112,7 @@ async def get_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( job_id=job_id, @@ -3673,19 +4120,23 @@ async def get_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_secret_attachment_without_preload_content( self, @@ -3694,7 +4145,10 @@ async def get_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3728,7 +4182,7 @@ async def get_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( job_id=job_id, @@ -3736,15 +4190,19 @@ async def get_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_secret_attachment_serialize( self, job_id, @@ -3757,35 +4215,46 @@ def _get_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/secrets/{secret_attachment_id}", + method='GET', + resource_path='/api/jobs/{job_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3795,16 +4264,22 @@ def _get_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3834,32 +4309,39 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobServerInfo", + '200': "JobServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3889,32 +4371,39 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobServerInfo", + '200': "JobServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3944,21 +4433,25 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobServerInfo", + '200': "JobServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_server_options_serialize( self, _request_auth, @@ -3969,13 +4462,16 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3984,16 +4480,24 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/info", + method='GET', + resource_path='/api/jobs/info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4003,9 +4507,12 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_service_account_attachment( self, @@ -4013,7 +4520,10 @@ async def get_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4045,26 +4555,30 @@ async def get_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_service_account_attachment_with_http_info( self, @@ -4072,7 +4586,10 @@ async def get_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4104,26 +4621,30 @@ async def get_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_service_account_attachment_without_preload_content( self, @@ -4131,7 +4652,10 @@ async def get_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4163,22 +4687,26 @@ async def get_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_service_account_attachment_serialize( self, job_id, @@ -4190,33 +4718,44 @@ def _get_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/service_account", + method='GET', + resource_path='/api/jobs/{job_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4226,9 +4765,12 @@ def _get_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_token_info( self, @@ -4236,7 +4778,10 @@ async def get_token_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4268,26 +4813,30 @@ async def get_token_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_token_info_with_http_info( self, @@ -4295,7 +4844,10 @@ async def get_token_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4327,26 +4879,30 @@ async def get_token_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_token_info_without_preload_content( self, @@ -4354,7 +4910,10 @@ async def get_token_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4386,22 +4945,26 @@ async def get_token_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_token_info_serialize( self, job_id, @@ -4413,33 +4976,44 @@ def _get_token_info_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/token", + method='GET', + resource_path='/api/jobs/{job_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4449,47 +5023,34 @@ def _get_token_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on job name.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on job name.")] = None, + tags: Annotated[Optional[StrictStr], Field(description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4512,8 +5073,10 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on job name. + :param name: Substring matched search string on job name. :type name: str + :param tags: Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. + :type tags: str :param prev_key: Previous page key. :type prev_key: str :param next_key: Next page key. @@ -4542,7 +5105,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4552,6 +5115,7 @@ async def list( org_id=org_id, owner=owner, name=name, + tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, @@ -4559,57 +5123,45 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobList", + '200': "JobList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on job name.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on job name.")] = None, + tags: Annotated[Optional[StrictStr], Field(description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4632,8 +5184,10 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on job name. + :param name: Substring matched search string on job name. :type name: str + :param tags: Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. + :type tags: str :param prev_key: Previous page key. :type prev_key: str :param next_key: Next page key. @@ -4662,7 +5216,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4672,6 +5226,7 @@ async def list_with_http_info( org_id=org_id, owner=owner, name=name, + tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, @@ -4679,57 +5234,45 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobList", + '200': "JobList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on job name.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on job name.")] = None, + tags: Annotated[Optional[StrictStr], Field(description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4752,8 +5295,10 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on job name. + :param name: Substring matched search string on job name. :type name: str + :param tags: Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'. + :type tags: str :param prev_key: Previous page key. :type prev_key: str :param next_key: Next page key. @@ -4782,7 +5327,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4792,6 +5337,7 @@ async def list_without_preload_content( org_id=org_id, owner=owner, name=name, + tags=tags, prev_key=prev_key, next_key=next_key, page_size=page_size, @@ -4799,15 +5345,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobList", + '200': "JobList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -4817,6 +5367,7 @@ def _list_serialize( org_id, owner, name, + tags, prev_key, next_key, page_size, @@ -4829,75 +5380,90 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + + if tags is not None: + + _query_params.append(('tags', tags)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs", + method='GET', + resource_path='/api/jobs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4907,23 +5473,26 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_runtime_summaries( self, job_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4962,7 +5531,7 @@ async def list_runtime_summaries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_runtime_summaries_serialize( job_id=job_id, @@ -4972,33 +5541,37 @@ async def list_runtime_summaries( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRuntimeSummaryList", + '200': "JobRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_runtime_summaries_with_http_info( self, job_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5037,7 +5610,7 @@ async def list_runtime_summaries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_runtime_summaries_serialize( job_id=job_id, @@ -5047,33 +5620,37 @@ async def list_runtime_summaries_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRuntimeSummaryList", + '200': "JobRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_runtime_summaries_without_preload_content( self, job_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5112,7 +5689,7 @@ async def list_runtime_summaries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_runtime_summaries_serialize( job_id=job_id, @@ -5122,15 +5699,19 @@ async def list_runtime_summaries_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "JobRuntimeSummaryList", + '200': "JobRuntimeSummaryList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_runtime_summaries_serialize( self, job_id, @@ -5145,45 +5726,56 @@ def _list_runtime_summaries_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/runtimesummary", + method='GET', + resource_path='/api/jobs/{job_id}/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5193,33 +5785,29 @@ def _list_runtime_summaries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_secret_attachments( self, job_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5231,7 +5819,7 @@ async def list_secret_attachments( :param job_id: (required) :type job_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -5263,7 +5851,7 @@ async def list_secret_attachments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( job_id=job_id, @@ -5276,43 +5864,40 @@ async def list_secret_attachments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_secret_attachments_with_http_info( self, job_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5324,7 +5909,7 @@ async def list_secret_attachments_with_http_info( :param job_id: (required) :type job_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -5356,7 +5941,7 @@ async def list_secret_attachments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( job_id=job_id, @@ -5369,43 +5954,40 @@ async def list_secret_attachments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_secret_attachments_without_preload_content( self, job_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5417,7 +5999,7 @@ async def list_secret_attachments_without_preload_content( :param job_id: (required) :type job_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -5449,7 +6031,7 @@ async def list_secret_attachments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( job_id=job_id, @@ -5462,15 +6044,19 @@ async def list_secret_attachments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_secret_attachments_serialize( self, job_id, @@ -5488,57 +6074,68 @@ def _list_secret_attachments_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters if location is not None: - - _query_params.append(("location", location)) - + + _query_params.append(('location', location)) + if attachment_type is not None: - - _query_params.append(("attachment_type", attachment_type.value)) - + + _query_params.append(('attachment_type', attachment_type.value)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/jobs/{job_id}/secrets", + method='GET', + resource_path='/api/jobs/{job_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5548,9 +6145,12 @@ def _list_secret_attachments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def restart( self, @@ -5559,7 +6159,10 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5594,7 +6197,7 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( job_id=job_id, @@ -5602,19 +6205,23 @@ async def restart( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def restart_with_http_info( self, @@ -5623,7 +6230,10 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5658,7 +6268,7 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( job_id=job_id, @@ -5666,19 +6276,23 @@ async def restart_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def restart_without_preload_content( self, @@ -5687,7 +6301,10 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5722,7 +6339,7 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( job_id=job_id, @@ -5730,15 +6347,19 @@ async def restart_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _restart_serialize( self, job_id, @@ -5751,18 +6372,21 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -5770,24 +6394,37 @@ def _restart_serialize( if job_restart is not None: _body_params = job_restart + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/restart", + method='POST', + resource_path='/api/jobs/{job_id}/restart', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5797,9 +6434,12 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def rotate_token( self, @@ -5807,7 +6447,10 @@ async def rotate_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5840,26 +6483,30 @@ async def rotate_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def rotate_token_with_http_info( self, @@ -5867,7 +6514,10 @@ async def rotate_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5900,26 +6550,30 @@ async def rotate_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def rotate_token_without_preload_content( self, @@ -5927,7 +6581,10 @@ async def rotate_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5960,22 +6617,26 @@ async def rotate_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _rotate_token_serialize( self, job_id, @@ -5987,33 +6648,44 @@ def _rotate_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/token", + method='POST', + resource_path='/api/jobs/{job_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6023,9 +6695,12 @@ def _rotate_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def schedule( self, @@ -6034,7 +6709,10 @@ async def schedule( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6068,7 +6746,7 @@ async def schedule( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._schedule_serialize( job_id=job_id, @@ -6076,19 +6754,23 @@ async def schedule( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def schedule_with_http_info( self, @@ -6097,7 +6779,10 @@ async def schedule_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6131,7 +6816,7 @@ async def schedule_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._schedule_serialize( job_id=job_id, @@ -6139,19 +6824,23 @@ async def schedule_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def schedule_without_preload_content( self, @@ -6160,7 +6849,10 @@ async def schedule_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6194,7 +6886,7 @@ async def schedule_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._schedule_serialize( job_id=job_id, @@ -6202,15 +6894,19 @@ async def schedule_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _schedule_serialize( self, job_id, @@ -6223,18 +6919,21 @@ def _schedule_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -6242,24 +6941,37 @@ def _schedule_serialize( if cron_schedule_update is not None: _body_params = cron_schedule_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/schedule", + method='POST', + resource_path='/api/jobs/{job_id}/schedule', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6269,9 +6981,12 @@ def _schedule_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def start( self, @@ -6280,7 +6995,10 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6315,7 +7033,7 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( job_id=job_id, @@ -6323,19 +7041,23 @@ async def start( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def start_with_http_info( self, @@ -6344,7 +7066,10 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6379,7 +7104,7 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( job_id=job_id, @@ -6387,19 +7112,23 @@ async def start_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def start_without_preload_content( self, @@ -6408,7 +7137,10 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6443,7 +7175,7 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( job_id=job_id, @@ -6451,15 +7183,19 @@ async def start_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _start_serialize( self, job_id, @@ -6472,18 +7208,21 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -6491,24 +7230,37 @@ def _start_serialize( if job_start is not None: _body_params = job_start + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/start", + method='POST', + resource_path='/api/jobs/{job_id}/start', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6518,9 +7270,12 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def stop( self, @@ -6528,7 +7283,10 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6561,26 +7319,30 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def stop_with_http_info( self, @@ -6588,7 +7350,10 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6621,26 +7386,30 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def stop_without_preload_content( self, @@ -6648,7 +7417,10 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6681,22 +7453,26 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _stop_serialize( self, job_id, @@ -6708,33 +7484,44 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/stop", + method='POST', + resource_path='/api/jobs/{job_id}/stop', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6744,9 +7531,12 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def stop_run( self, @@ -6755,7 +7545,10 @@ async def stop_run( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6790,7 +7583,7 @@ async def stop_run( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_run_serialize( job_id=job_id, @@ -6798,19 +7591,23 @@ async def stop_run( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def stop_run_with_http_info( self, @@ -6819,7 +7616,10 @@ async def stop_run_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6854,7 +7654,7 @@ async def stop_run_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_run_serialize( job_id=job_id, @@ -6862,19 +7662,23 @@ async def stop_run_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def stop_run_without_preload_content( self, @@ -6883,7 +7687,10 @@ async def stop_run_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6918,7 +7725,7 @@ async def stop_run_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_run_serialize( job_id=job_id, @@ -6926,15 +7733,19 @@ async def stop_run_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _stop_run_serialize( self, job_id, @@ -6947,35 +7758,46 @@ def _stop_run_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id if run_name is not None: - _path_params["run_name"] = run_name + _path_params['run_name'] = run_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/stop/{run_name}", + method='POST', + resource_path='/api/jobs/{job_id}/stop/{run_name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6985,9 +7807,12 @@ def _stop_run_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def unschedule( self, @@ -6995,7 +7820,10 @@ async def unschedule( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7027,26 +7855,30 @@ async def unschedule( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unschedule_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def unschedule_with_http_info( self, @@ -7054,7 +7886,10 @@ async def unschedule_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7086,26 +7921,30 @@ async def unschedule_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unschedule_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def unschedule_without_preload_content( self, @@ -7113,7 +7952,10 @@ async def unschedule_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7145,22 +7987,26 @@ async def unschedule_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unschedule_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _unschedule_serialize( self, job_id, @@ -7172,33 +8018,44 @@ def _unschedule_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/jobs/{job_id}/unschedule", + method='POST', + resource_path='/api/jobs/{job_id}/unschedule', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7208,9 +8065,12 @@ def _unschedule_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -7219,7 +8079,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7254,7 +8117,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( job_id=job_id, @@ -7262,19 +8125,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -7283,7 +8150,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7318,7 +8188,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( job_id=job_id, @@ -7326,19 +8196,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -7347,7 +8221,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7382,7 +8259,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( job_id=job_id, @@ -7390,15 +8267,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + '200': "Job", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, job_id, @@ -7411,18 +8292,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -7430,24 +8314,37 @@ def _update_serialize( if job_update is not None: _body_params = job_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/jobs/{job_id}", + method='PATCH', + resource_path='/api/jobs/{job_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7457,9 +8354,12 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_resource_template( self, @@ -7467,7 +8367,10 @@ async def update_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7499,26 +8402,30 @@ async def update_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_resource_template_with_http_info( self, @@ -7526,7 +8433,10 @@ async def update_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7558,26 +8468,30 @@ async def update_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_resource_template_without_preload_content( self, @@ -7585,7 +8499,10 @@ async def update_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7617,22 +8534,26 @@ async def update_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_resource_template_serialize( self, job_id, @@ -7644,33 +8565,44 @@ def _update_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/jobs/{job_id}/template", + method='PATCH', + resource_path='/api/jobs/{job_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7680,9 +8612,12 @@ def _update_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_secret_attachment( self, @@ -7692,7 +8627,10 @@ async def update_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7728,7 +8666,7 @@ async def update_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( job_id=job_id, @@ -7737,19 +8675,23 @@ async def update_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_secret_attachment_with_http_info( self, @@ -7759,7 +8701,10 @@ async def update_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7795,7 +8740,7 @@ async def update_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( job_id=job_id, @@ -7804,19 +8749,23 @@ async def update_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_secret_attachment_without_preload_content( self, @@ -7826,7 +8775,10 @@ async def update_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7862,7 +8814,7 @@ async def update_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( job_id=job_id, @@ -7871,15 +8823,19 @@ async def update_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_secret_attachment_serialize( self, job_id, @@ -7893,20 +8849,23 @@ def _update_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -7914,24 +8873,37 @@ def _update_secret_attachment_serialize( if secret_attachment_update is not None: _body_params = secret_attachment_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/jobs/{job_id}/secrets/{secret_attachment_id}", + method='PATCH', + resource_path='/api/jobs/{job_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7941,9 +8913,12 @@ def _update_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_token( self, @@ -7952,7 +8927,10 @@ async def update_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7987,7 +8965,7 @@ async def update_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( job_id=job_id, @@ -7995,19 +8973,23 @@ async def update_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_token_with_http_info( self, @@ -8016,7 +8998,10 @@ async def update_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8051,7 +9036,7 @@ async def update_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( job_id=job_id, @@ -8059,19 +9044,23 @@ async def update_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_token_without_preload_content( self, @@ -8080,7 +9069,10 @@ async def update_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8115,7 +9107,7 @@ async def update_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( job_id=job_id, @@ -8123,15 +9115,19 @@ async def update_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_token_serialize( self, job_id, @@ -8144,18 +9140,21 @@ def _update_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params["job_id"] = job_id + _path_params['job_id'] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -8163,24 +9162,37 @@ def _update_token_serialize( if resource_token_update is not None: _body_params = resource_token_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/jobs/{job_id}/token", + method='PATCH', + resource_path='/api/jobs/{job_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8190,5 +9202,7 @@ def _update_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/limits_api.py b/saturn_api/api/limits_api.py index 917e8a0..9872f79 100644 --- a/saturn_api/api/limits_api.py +++ b/saturn_api/api/limits_api.py @@ -1,27 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.usage_limits_create import UsageLimitsCreate from saturn_api.models.usage_limits_list import UsageLimitsList from saturn_api.models.usage_limits_update import UsageLimitsUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -37,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -44,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( usage_limits_create=usage_limits_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "UsageLimits", + '201': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -104,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -137,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( usage_limits_create=usage_limits_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "UsageLimits", + '201': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -164,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -197,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( usage_limits_create=usage_limits_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "UsageLimits", + '201': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, usage_limits_create, @@ -224,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -241,24 +269,37 @@ def _create_serialize( if usage_limits_create is not None: _body_params = usage_limits_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/limits", + method='POST', + resource_path='/api/limits', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -268,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -278,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -311,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -338,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -371,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -398,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -431,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, limits_id, @@ -458,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if limits_id is not None: - _path_params["limits_id"] = limits_id + _path_params['limits_id'] = limits_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/limits/{limits_id}", + method='DELETE', + resource_path='/api/limits/{limits_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -490,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -500,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -533,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -560,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -593,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -620,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -653,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, limits_id, @@ -680,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if limits_id is not None: - _path_params["limits_id"] = limits_id + _path_params['limits_id'] = limits_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/limits/{limits_id}", + method='GET', + resource_path='/api/limits/{limits_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -716,35 +824,28 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on usage limit name."), - ] = None, - org_id: Annotated[ - Optional[StrictStr], - Field( - description="Filter usage limits by org. Defaults to the default org for the current user/group." - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on usage limit name.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Filter usage limits by org. Defaults to the default org for the current user/group.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -755,7 +856,7 @@ async def list( Paginated list of limits. - :param name: Prefix matched search string on usage limit name. + :param name: Substring matched search string on usage limit name. :type name: str :param org_id: Filter usage limits by org. Defaults to the default org for the current user/group. :type org_id: str @@ -787,7 +888,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -799,45 +900,39 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimitsList", + '200': "UsageLimitsList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on usage limit name."), - ] = None, - org_id: Annotated[ - Optional[StrictStr], - Field( - description="Filter usage limits by org. Defaults to the default org for the current user/group." - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on usage limit name.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Filter usage limits by org. Defaults to the default org for the current user/group.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -848,7 +943,7 @@ async def list_with_http_info( Paginated list of limits. - :param name: Prefix matched search string on usage limit name. + :param name: Substring matched search string on usage limit name. :type name: str :param org_id: Filter usage limits by org. Defaults to the default org for the current user/group. :type org_id: str @@ -880,7 +975,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -892,45 +987,39 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimitsList", + '200': "UsageLimitsList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on usage limit name."), - ] = None, - org_id: Annotated[ - Optional[StrictStr], - Field( - description="Filter usage limits by org. Defaults to the default org for the current user/group." - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on usage limit name.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Filter usage limits by org. Defaults to the default org for the current user/group.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -941,7 +1030,7 @@ async def list_without_preload_content( Paginated list of limits. - :param name: Prefix matched search string on usage limit name. + :param name: Substring matched search string on usage limit name. :type name: str :param org_id: Filter usage limits by org. Defaults to the default org for the current user/group. :type org_id: str @@ -973,7 +1062,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -985,15 +1074,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimitsList", + '200': "UsageLimitsList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, name, @@ -1010,55 +1103,66 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/limits", + method='GET', + resource_path='/api/limits', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1068,9 +1172,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1079,7 +1186,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1114,7 +1224,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( limits_id=limits_id, @@ -1122,19 +1232,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1143,7 +1257,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1178,7 +1295,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( limits_id=limits_id, @@ -1186,19 +1303,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1207,7 +1328,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1242,7 +1366,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( limits_id=limits_id, @@ -1250,15 +1374,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, limits_id, @@ -1271,18 +1399,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if limits_id is not None: - _path_params["limits_id"] = limits_id + _path_params['limits_id'] = limits_id # process the query parameters # process the header parameters # process the form parameters @@ -1290,24 +1421,37 @@ def _update_serialize( if usage_limits_update is not None: _body_params = usage_limits_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/limits/{limits_id}", + method='PATCH', + resource_path='/api/limits/{limits_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1317,5 +1461,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/notifications_api.py b/saturn_api/api/notifications_api.py index 59a741b..34c8436 100644 --- a/saturn_api/api/notifications_api.py +++ b/saturn_api/api/notifications_api.py @@ -1,32 +1,33 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.notification_acknowledged import NotificationAcknowledged from saturn_api.models.notification_delete import NotificationDelete from saturn_api.models.notification_list import NotificationList from saturn_api.models.notification_subscribe import NotificationSubscribe from saturn_api.models.notification_subscription import NotificationSubscription -from saturn_api.models.notification_subscription_list import ( - NotificationSubscriptionList, -) +from saturn_api.models.notification_subscription_list import NotificationSubscriptionList from saturn_api.models.notification_unsubscribe import NotificationUnsubscribe + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -42,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def acknowledge( self, @@ -49,7 +51,10 @@ async def acknowledge( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,26 +87,30 @@ async def acknowledge( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._acknowledge_serialize( notification_acknowledged=notification_acknowledged, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def acknowledge_with_http_info( self, @@ -109,7 +118,10 @@ async def acknowledge_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -142,26 +154,30 @@ async def acknowledge_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._acknowledge_serialize( notification_acknowledged=notification_acknowledged, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def acknowledge_without_preload_content( self, @@ -169,7 +185,10 @@ async def acknowledge_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -202,22 +221,26 @@ async def acknowledge_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._acknowledge_serialize( notification_acknowledged=notification_acknowledged, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _acknowledge_serialize( self, notification_acknowledged, @@ -229,13 +252,16 @@ def _acknowledge_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -246,20 +272,30 @@ def _acknowledge_serialize( if notification_acknowledged is not None: _body_params = notification_acknowledged + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/api/notifications", + method='PUT', + resource_path='/api/notifications', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -269,9 +305,12 @@ def _acknowledge_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -279,7 +318,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -311,26 +353,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( notification_delete=notification_delete, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -338,7 +384,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -370,26 +419,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( notification_delete=notification_delete, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -397,7 +450,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -429,22 +485,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( notification_delete=notification_delete, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, notification_delete, @@ -456,13 +516,16 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -473,20 +536,30 @@ def _delete_serialize( if notification_delete is not None: _body_params = notification_delete + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/notifications", + method='DELETE', + resource_path='/api/notifications', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -496,25 +569,26 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -552,7 +626,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( prev_key=prev_key, @@ -562,35 +636,37 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", + '200': "NotificationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -628,7 +704,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( prev_key=prev_key, @@ -638,35 +714,37 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", + '200': "NotificationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -704,7 +782,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( prev_key=prev_key, @@ -714,15 +792,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", + '200': "NotificationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, prev_key, @@ -737,47 +819,58 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/notifications", + method='GET', + resource_path='/api/notifications', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -787,34 +880,28 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_subscriptions( self, - topic: Annotated[ - Optional[StrictStr], Field(description="Filter notification subscriptions by topic.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="Filter notification subscriptions by user ID. Defaults to authenticated user." - ), - ] = None, + topic: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by topic.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by user ID. Defaults to authenticated user.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -856,7 +943,7 @@ async def list_subscriptions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_subscriptions_serialize( topic=topic, @@ -868,44 +955,39 @@ async def list_subscriptions( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationSubscriptionList", + '200': "NotificationSubscriptionList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_subscriptions_with_http_info( self, - topic: Annotated[ - Optional[StrictStr], Field(description="Filter notification subscriptions by topic.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="Filter notification subscriptions by user ID. Defaults to authenticated user." - ), - ] = None, + topic: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by topic.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by user ID. Defaults to authenticated user.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -947,7 +1029,7 @@ async def list_subscriptions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_subscriptions_serialize( topic=topic, @@ -959,44 +1041,39 @@ async def list_subscriptions_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationSubscriptionList", + '200': "NotificationSubscriptionList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_subscriptions_without_preload_content( self, - topic: Annotated[ - Optional[StrictStr], Field(description="Filter notification subscriptions by topic.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="Filter notification subscriptions by user ID. Defaults to authenticated user." - ), - ] = None, + topic: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by topic.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by user ID. Defaults to authenticated user.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1038,7 +1115,7 @@ async def list_subscriptions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_subscriptions_serialize( topic=topic, @@ -1050,15 +1127,19 @@ async def list_subscriptions_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationSubscriptionList", + '200': "NotificationSubscriptionList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_subscriptions_serialize( self, topic, @@ -1075,55 +1156,66 @@ def _list_subscriptions_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if topic is not None: - - _query_params.append(("topic", topic)) - + + _query_params.append(('topic', topic)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/notifications/subscriptions", + method='GET', + resource_path='/api/notifications/subscriptions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1133,9 +1225,12 @@ def _list_subscriptions_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def subscribe( self, @@ -1143,7 +1238,10 @@ async def subscribe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1175,26 +1273,30 @@ async def subscribe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._subscribe_serialize( notification_subscribe=notification_subscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationSubscription", + '200': "NotificationSubscription", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def subscribe_with_http_info( self, @@ -1202,7 +1304,10 @@ async def subscribe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1234,26 +1339,30 @@ async def subscribe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._subscribe_serialize( notification_subscribe=notification_subscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationSubscription", + '200': "NotificationSubscription", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def subscribe_without_preload_content( self, @@ -1261,7 +1370,10 @@ async def subscribe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1293,22 +1405,26 @@ async def subscribe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._subscribe_serialize( notification_subscribe=notification_subscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationSubscription", + '200': "NotificationSubscription", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _subscribe_serialize( self, notification_subscribe, @@ -1320,13 +1436,16 @@ def _subscribe_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1337,24 +1456,37 @@ def _subscribe_serialize( if notification_subscribe is not None: _body_params = notification_subscribe + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/api/notifications/subscriptions", + method='PUT', + resource_path='/api/notifications/subscriptions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1364,9 +1496,12 @@ def _subscribe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def unsubscribe( self, @@ -1374,7 +1509,10 @@ async def unsubscribe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1406,26 +1544,30 @@ async def unsubscribe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unsubscribe_serialize( notification_unsubscribe=notification_unsubscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def unsubscribe_with_http_info( self, @@ -1433,7 +1575,10 @@ async def unsubscribe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1465,26 +1610,30 @@ async def unsubscribe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unsubscribe_serialize( notification_unsubscribe=notification_unsubscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def unsubscribe_without_preload_content( self, @@ -1492,7 +1641,10 @@ async def unsubscribe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1524,22 +1676,26 @@ async def unsubscribe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unsubscribe_serialize( notification_unsubscribe=notification_unsubscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _unsubscribe_serialize( self, notification_unsubscribe, @@ -1551,13 +1707,16 @@ def _unsubscribe_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1568,20 +1727,30 @@ def _unsubscribe_serialize( if notification_unsubscribe is not None: _body_params = notification_unsubscribe + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/notifications/subscriptions", + method='DELETE', + resource_path='/api/notifications/subscriptions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1591,5 +1760,7 @@ def _unsubscribe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/object_storage_api.py b/saturn_api/api/object_storage_api.py index 87ea4e7..c0b22e1 100644 --- a/saturn_api/api/object_storage_api.py +++ b/saturn_api/api/object_storage_api.py @@ -1,53 +1,38 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse -from saturn_api.models.object_storage_bulk_delete_results import ( - ObjectStorageBulkDeleteResults, -) +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from saturn_api.models.object_storage_bulk_delete_results import ObjectStorageBulkDeleteResults from saturn_api.models.object_storage_bulk_download import ObjectStorageBulkDownload from saturn_api.models.object_storage_bulk_reference import ObjectStorageBulkReference -from saturn_api.models.object_storage_completed_upload import ( - ObjectStorageCompletedUpload, -) +from saturn_api.models.object_storage_completed_upload import ObjectStorageCompletedUpload from saturn_api.models.object_storage_list import ObjectStorageList -from saturn_api.models.object_storage_presigned_download import ( - ObjectStoragePresignedDownload, -) -from saturn_api.models.object_storage_presigned_upload import ( - ObjectStoragePresignedUpload, -) +from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload +from saturn_api.models.object_storage_presigned_upload import ObjectStoragePresignedUpload from saturn_api.models.object_storage_reference import ObjectStorageReference -from saturn_api.models.object_storage_shared_owner_list import ( - ObjectStorageSharedOwnerList, -) +from saturn_api.models.object_storage_shared_owner_list import ObjectStorageSharedOwnerList from saturn_api.models.object_storage_upload_create import ObjectStorageUploadCreate from saturn_api.models.object_storage_upload_list import ObjectStorageUploadList from saturn_api.models.object_storage_usage_stats import ObjectStorageUsageStats + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -63,6 +48,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def cancel_upload( self, @@ -70,7 +56,10 @@ async def cancel_upload( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -102,26 +91,30 @@ async def cancel_upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_upload_serialize( object_storage_upload_id=object_storage_upload_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def cancel_upload_with_http_info( self, @@ -129,7 +122,10 @@ async def cancel_upload_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -161,26 +157,30 @@ async def cancel_upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_upload_serialize( object_storage_upload_id=object_storage_upload_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def cancel_upload_without_preload_content( self, @@ -188,7 +188,10 @@ async def cancel_upload_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -220,22 +223,26 @@ async def cancel_upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_upload_serialize( object_storage_upload_id=object_storage_upload_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _cancel_upload_serialize( self, object_storage_upload_id, @@ -247,29 +254,37 @@ def _cancel_upload_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if object_storage_upload_id is not None: - _path_params["object_storage_upload_id"] = object_storage_upload_id + _path_params['object_storage_upload_id'] = object_storage_upload_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/object_storage/upload/{object_storage_upload_id}", + method='DELETE', + resource_path='/api/object_storage/upload/{object_storage_upload_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -279,9 +294,12 @@ def _cancel_upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def complete_upload( self, @@ -290,7 +308,10 @@ async def complete_upload( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -324,7 +345,7 @@ async def complete_upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._complete_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -332,19 +353,23 @@ async def complete_upload( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def complete_upload_with_http_info( self, @@ -353,7 +378,10 @@ async def complete_upload_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -387,7 +415,7 @@ async def complete_upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._complete_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -395,19 +423,23 @@ async def complete_upload_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def complete_upload_without_preload_content( self, @@ -416,7 +448,10 @@ async def complete_upload_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -450,7 +485,7 @@ async def complete_upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._complete_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -458,15 +493,19 @@ async def complete_upload_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _complete_upload_serialize( self, object_storage_upload_id, @@ -479,18 +518,21 @@ def _complete_upload_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if object_storage_upload_id is not None: - _path_params["object_storage_upload_id"] = object_storage_upload_id + _path_params['object_storage_upload_id'] = object_storage_upload_id # process the query parameters # process the header parameters # process the form parameters @@ -498,20 +540,30 @@ def _complete_upload_serialize( if object_storage_completed_upload is not None: _body_params = object_storage_completed_upload + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/object_storage/upload/{object_storage_upload_id}", + method='POST', + resource_path='/api/object_storage/upload/{object_storage_upload_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -521,9 +573,12 @@ def _complete_upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -531,7 +586,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -563,26 +621,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -590,7 +652,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -622,26 +687,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -649,7 +718,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -681,22 +753,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, object_storage_reference, @@ -708,13 +784,16 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -725,20 +804,30 @@ def _delete_serialize( if object_storage_reference is not None: _body_params = object_storage_reference + + # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/object_storage/delete", + method='DELETE', + resource_path='/api/object_storage/delete', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -748,9 +837,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_bulk( self, @@ -758,7 +850,10 @@ async def delete_bulk( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -790,26 +885,30 @@ async def delete_bulk( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageBulkDeleteResults", + '200': "ObjectStorageBulkDeleteResults", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_bulk_with_http_info( self, @@ -817,7 +916,10 @@ async def delete_bulk_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -849,26 +951,30 @@ async def delete_bulk_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageBulkDeleteResults", + '200': "ObjectStorageBulkDeleteResults", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_bulk_without_preload_content( self, @@ -876,7 +982,10 @@ async def delete_bulk_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -908,22 +1017,26 @@ async def delete_bulk_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageBulkDeleteResults", + '200': "ObjectStorageBulkDeleteResults", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_bulk_serialize( self, object_storage_bulk_reference, @@ -935,13 +1048,16 @@ def _delete_bulk_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -952,24 +1068,37 @@ def _delete_bulk_serialize( if object_storage_bulk_reference is not None: _body_params = object_storage_bulk_reference + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/object_storage/bulk_delete", + method='DELETE', + resource_path='/api/object_storage/bulk_delete', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -979,9 +1108,12 @@ def _delete_bulk_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def download( self, @@ -989,7 +1121,10 @@ async def download( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1022,26 +1157,30 @@ async def download( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedDownload", + '200': "ObjectStoragePresignedDownload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def download_with_http_info( self, @@ -1049,7 +1188,10 @@ async def download_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1082,26 +1224,30 @@ async def download_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedDownload", + '200': "ObjectStoragePresignedDownload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def download_without_preload_content( self, @@ -1109,7 +1255,10 @@ async def download_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1142,22 +1291,26 @@ async def download_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedDownload", + '200': "ObjectStoragePresignedDownload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _download_serialize( self, object_storage_reference, @@ -1169,13 +1322,16 @@ def _download_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1186,24 +1342,37 @@ def _download_serialize( if object_storage_reference is not None: _body_params = object_storage_reference + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/object_storage/download", + method='POST', + resource_path='/api/object_storage/download', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1213,9 +1382,12 @@ def _download_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def download_bulk( self, @@ -1223,7 +1395,10 @@ async def download_bulk( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1256,26 +1431,30 @@ async def download_bulk( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageBulkDownload", + '200': "ObjectStorageBulkDownload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def download_bulk_with_http_info( self, @@ -1283,7 +1462,10 @@ async def download_bulk_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1316,26 +1498,30 @@ async def download_bulk_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageBulkDownload", + '200': "ObjectStorageBulkDownload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def download_bulk_without_preload_content( self, @@ -1343,7 +1529,10 @@ async def download_bulk_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1376,22 +1565,26 @@ async def download_bulk_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageBulkDownload", + '200': "ObjectStorageBulkDownload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _download_bulk_serialize( self, object_storage_bulk_reference, @@ -1403,13 +1596,16 @@ def _download_bulk_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1420,24 +1616,37 @@ def _download_bulk_serialize( if object_storage_bulk_reference is not None: _body_params = object_storage_bulk_reference + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/object_storage/bulk_download", + method='POST', + resource_path='/api/object_storage/bulk_download', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1447,35 +1656,28 @@ def _download_bulk_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_usage( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1517,7 +1719,7 @@ async def get_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_serialize( owner_name=owner_name, @@ -1529,45 +1731,39 @@ async def get_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageUsageStats", + '200': "ObjectStorageUsageStats", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_usage_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1609,7 +1805,7 @@ async def get_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_serialize( owner_name=owner_name, @@ -1621,45 +1817,39 @@ async def get_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageUsageStats", + '200': "ObjectStorageUsageStats", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_usage_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1701,7 +1891,7 @@ async def get_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_serialize( owner_name=owner_name, @@ -1713,15 +1903,19 @@ async def get_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageUsageStats", + '200': "ObjectStorageUsageStats", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_usage_serialize( self, owner_name, @@ -1738,55 +1932,66 @@ def _get_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/object_storage/usage", + method='GET', + resource_path='/api/object_storage/usage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1796,49 +2001,32 @@ def _get_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - prefix: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on object storage file path."), - ] = None, - last_key: Annotated[ - Optional[StrictStr], Field(description="Last seen key for pagination.") - ] = None, - max_keys: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - delimited: Annotated[ - Optional[StrictBool], Field(description="Delimit results by directory.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage file path.")] = None, + last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, + max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + delimited: Annotated[Optional[StrictBool], Field(description="Delimit results by directory.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1889,7 +2077,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1905,59 +2093,43 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageList", + '200': "ObjectStorageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - prefix: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on object storage file path."), - ] = None, - last_key: Annotated[ - Optional[StrictStr], Field(description="Last seen key for pagination.") - ] = None, - max_keys: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - delimited: Annotated[ - Optional[StrictBool], Field(description="Delimit results by directory.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage file path.")] = None, + last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, + max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + delimited: Annotated[Optional[StrictBool], Field(description="Delimit results by directory.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2008,7 +2180,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -2024,59 +2196,43 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageList", + '200': "ObjectStorageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - prefix: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on object storage file path."), - ] = None, - last_key: Annotated[ - Optional[StrictStr], Field(description="Last seen key for pagination.") - ] = None, - max_keys: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - delimited: Annotated[ - Optional[StrictBool], Field(description="Delimit results by directory.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage file path.")] = None, + last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, + max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + delimited: Annotated[Optional[StrictBool], Field(description="Delimit results by directory.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2127,7 +2283,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -2143,15 +2299,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageList", + '200': "ObjectStorageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -2172,71 +2332,82 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if prefix is not None: - - _query_params.append(("prefix", prefix)) - + + _query_params.append(('prefix', prefix)) + if last_key is not None: - - _query_params.append(("last_key", last_key)) - + + _query_params.append(('last_key', last_key)) + if max_keys is not None: - - _query_params.append(("max_keys", max_keys)) - + + _query_params.append(('max_keys', max_keys)) + if delimited is not None: - - _query_params.append(("delimited", delimited)) - + + _query_params.append(('delimited', delimited)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/object_storage", + method='GET', + resource_path='/api/object_storage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2246,42 +2417,30 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_shared( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - last_key: Annotated[ - Optional[StrictStr], Field(description="Last seen key for pagination.") - ] = None, - max_keys: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, + max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2328,7 +2487,7 @@ async def list_shared( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_shared_serialize( owner_name=owner_name, @@ -2342,52 +2501,41 @@ async def list_shared( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageSharedOwnerList", + '200': "ObjectStorageSharedOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_shared_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - last_key: Annotated[ - Optional[StrictStr], Field(description="Last seen key for pagination.") - ] = None, - max_keys: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, + max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2434,7 +2582,7 @@ async def list_shared_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_shared_serialize( owner_name=owner_name, @@ -2448,52 +2596,41 @@ async def list_shared_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageSharedOwnerList", + '200': "ObjectStorageSharedOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_shared_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - last_key: Annotated[ - Optional[StrictStr], Field(description="Last seen key for pagination.") - ] = None, - max_keys: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, + max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2540,7 +2677,7 @@ async def list_shared_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_shared_serialize( owner_name=owner_name, @@ -2554,15 +2691,19 @@ async def list_shared_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageSharedOwnerList", + '200': "ObjectStorageSharedOwnerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_shared_serialize( self, owner_name, @@ -2581,63 +2722,74 @@ def _list_shared_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if last_key is not None: - - _query_params.append(("last_key", last_key)) - + + _query_params.append(('last_key', last_key)) + if max_keys is not None: - - _query_params.append(("max_keys", max_keys)) - + + _query_params.append(('max_keys', max_keys)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/object_storage/shared", + method='GET', + resource_path='/api/object_storage/shared', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2647,43 +2799,30 @@ def _list_shared_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_uploads( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - prefix: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on object storage upload file path"), - ] = None, - is_copy: Annotated[ - Optional[StrictBool], - Field(description="Filter object storage uploads that are or aren't copy operations."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage upload file path")] = None, + is_copy: Annotated[Optional[StrictBool], Field(description="Filter object storage uploads that are or aren't copy operations.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2729,7 +2868,7 @@ async def list_uploads( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_uploads_serialize( owner_name=owner_name, @@ -2743,53 +2882,41 @@ async def list_uploads( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageUploadList", + '200': "ObjectStorageUploadList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_uploads_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - prefix: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on object storage upload file path"), - ] = None, - is_copy: Annotated[ - Optional[StrictBool], - Field(description="Filter object storage uploads that are or aren't copy operations."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage upload file path")] = None, + is_copy: Annotated[Optional[StrictBool], Field(description="Filter object storage uploads that are or aren't copy operations.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2835,7 +2962,7 @@ async def list_uploads_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_uploads_serialize( owner_name=owner_name, @@ -2849,53 +2976,41 @@ async def list_uploads_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageUploadList", + '200': "ObjectStorageUploadList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_uploads_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - prefix: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on object storage upload file path"), - ] = None, - is_copy: Annotated[ - Optional[StrictBool], - Field(description="Filter object storage uploads that are or aren't copy operations."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage upload file path")] = None, + is_copy: Annotated[Optional[StrictBool], Field(description="Filter object storage uploads that are or aren't copy operations.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2941,7 +3056,7 @@ async def list_uploads_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_uploads_serialize( owner_name=owner_name, @@ -2955,15 +3070,19 @@ async def list_uploads_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStorageUploadList", + '200': "ObjectStorageUploadList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_uploads_serialize( self, owner_name, @@ -2982,63 +3101,74 @@ def _list_uploads_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if prefix is not None: - - _query_params.append(("prefix", prefix)) - + + _query_params.append(('prefix', prefix)) + if is_copy is not None: - - _query_params.append(("is_copy", is_copy)) - + + _query_params.append(('is_copy', is_copy)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/object_storage/upload", + method='GET', + resource_path='/api/object_storage/upload', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3048,29 +3178,26 @@ def _list_uploads_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def resume_upload( self, object_storage_upload_id: StrictStr, - first_part: Annotated[ - Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], - Field(description="Index of the first part to retrieve presigned upload URLs for."), - ] = None, - last_part: Annotated[ - Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], - Field(description="Index of the last part to retrieve presigned upload URLs for."), - ] = None, - last_part_size: Annotated[ - Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], - Field(description="Final part size for uploads with unspecified total size."), - ] = None, + first_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the first part to retrieve presigned upload URLs for.")] = None, + last_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the last part to retrieve presigned upload URLs for.")] = None, + last_part_size: Annotated[Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], Field(description="Final part size for uploads with unspecified total size.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3108,7 +3235,7 @@ async def resume_upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -3118,39 +3245,37 @@ async def resume_upload( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedUpload", + '200': "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def resume_upload_with_http_info( self, object_storage_upload_id: StrictStr, - first_part: Annotated[ - Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], - Field(description="Index of the first part to retrieve presigned upload URLs for."), - ] = None, - last_part: Annotated[ - Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], - Field(description="Index of the last part to retrieve presigned upload URLs for."), - ] = None, - last_part_size: Annotated[ - Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], - Field(description="Final part size for uploads with unspecified total size."), - ] = None, + first_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the first part to retrieve presigned upload URLs for.")] = None, + last_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the last part to retrieve presigned upload URLs for.")] = None, + last_part_size: Annotated[Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], Field(description="Final part size for uploads with unspecified total size.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3188,7 +3313,7 @@ async def resume_upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -3198,39 +3323,37 @@ async def resume_upload_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedUpload", + '200': "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def resume_upload_without_preload_content( self, object_storage_upload_id: StrictStr, - first_part: Annotated[ - Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], - Field(description="Index of the first part to retrieve presigned upload URLs for."), - ] = None, - last_part: Annotated[ - Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], - Field(description="Index of the last part to retrieve presigned upload URLs for."), - ] = None, - last_part_size: Annotated[ - Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], - Field(description="Final part size for uploads with unspecified total size."), - ] = None, + first_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the first part to retrieve presigned upload URLs for.")] = None, + last_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the last part to retrieve presigned upload URLs for.")] = None, + last_part_size: Annotated[Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], Field(description="Final part size for uploads with unspecified total size.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3268,7 +3391,7 @@ async def resume_upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -3278,15 +3401,19 @@ async def resume_upload_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedUpload", + '200': "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _resume_upload_serialize( self, object_storage_upload_id, @@ -3301,45 +3428,56 @@ def _resume_upload_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if object_storage_upload_id is not None: - _path_params["object_storage_upload_id"] = object_storage_upload_id + _path_params['object_storage_upload_id'] = object_storage_upload_id # process the query parameters if first_part is not None: - - _query_params.append(("first_part", first_part)) - + + _query_params.append(('first_part', first_part)) + if last_part is not None: - - _query_params.append(("last_part", last_part)) - + + _query_params.append(('last_part', last_part)) + if last_part_size is not None: - - _query_params.append(("last_part_size", last_part_size)) - + + _query_params.append(('last_part_size', last_part_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/object_storage/upload/{object_storage_upload_id}", + method='GET', + resource_path='/api/object_storage/upload/{object_storage_upload_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3349,9 +3487,12 @@ def _resume_upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def upload( self, @@ -3359,7 +3500,10 @@ async def upload( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3391,26 +3535,30 @@ async def upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upload_serialize( object_storage_upload_create=object_storage_upload_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedUpload", + '200': "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def upload_with_http_info( self, @@ -3418,7 +3566,10 @@ async def upload_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3450,26 +3601,30 @@ async def upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upload_serialize( object_storage_upload_create=object_storage_upload_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedUpload", + '200': "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def upload_without_preload_content( self, @@ -3477,7 +3632,10 @@ async def upload_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3509,22 +3667,26 @@ async def upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upload_serialize( object_storage_upload_create=object_storage_upload_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ObjectStoragePresignedUpload", + '200': "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _upload_serialize( self, object_storage_upload_create, @@ -3536,13 +3698,16 @@ def _upload_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3553,24 +3718,37 @@ def _upload_serialize( if object_storage_upload_create is not None: _body_params = object_storage_upload_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/object_storage/upload", + method='POST', + resource_path='/api/object_storage/upload', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3580,5 +3758,7 @@ def _upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/orgs_api.py b/saturn_api/api/orgs_api.py index 718c06a..0b9a624 100644 --- a/saturn_api/api/orgs_api.py +++ b/saturn_api/api/orgs_api.py @@ -1,24 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.aggregated_usage import AggregatedUsage from saturn_api.models.daily_usage_list import DailyUsageList from saturn_api.models.identity_type import IdentityType @@ -38,6 +38,9 @@ from saturn_api.models.owner_usage_list import OwnerUsageList from saturn_api.models.owner_user_detailed import OwnerUserDetailed from saturn_api.models.usage_limits import UsageLimits + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -53,6 +56,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def accept_invitation( self, @@ -60,7 +64,10 @@ async def accept_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -92,26 +99,30 @@ async def accept_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerDetailed", + '200': "OwnerDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def accept_invitation_with_http_info( self, @@ -119,7 +130,10 @@ async def accept_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,26 +165,30 @@ async def accept_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerDetailed", + '200': "OwnerDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def accept_invitation_without_preload_content( self, @@ -178,7 +196,10 @@ async def accept_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -210,22 +231,26 @@ async def accept_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerDetailed", + '200': "OwnerDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _accept_invitation_serialize( self, token, @@ -237,33 +262,44 @@ def _accept_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if token is not None: - _path_params["token"] = token + _path_params['token'] = token # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/orgs/invitation/{token}/accept", + method='POST', + resource_path='/api/orgs/invitation/{token}/accept', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -273,9 +309,12 @@ def _accept_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create( self, @@ -283,7 +322,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -316,26 +358,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( org_create=org_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Org", + '201': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -343,7 +389,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -376,26 +425,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( org_create=org_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Org", + '201': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -403,7 +456,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -436,22 +492,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( org_create=org_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Org", + '201': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, org_create, @@ -463,13 +523,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -480,24 +543,37 @@ def _create_serialize( if org_create is not None: _body_params = org_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/orgs", + method='POST', + resource_path='/api/orgs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -507,9 +583,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_invitation( self, @@ -518,7 +597,10 @@ async def create_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -552,7 +634,7 @@ async def create_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitation_serialize( org_id=org_id, @@ -560,19 +642,23 @@ async def create_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "OrgInvitation", + '201': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_invitation_with_http_info( self, @@ -581,7 +667,10 @@ async def create_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -615,7 +704,7 @@ async def create_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitation_serialize( org_id=org_id, @@ -623,19 +712,23 @@ async def create_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "OrgInvitation", + '201': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_invitation_without_preload_content( self, @@ -644,7 +737,10 @@ async def create_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -678,7 +774,7 @@ async def create_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitation_serialize( org_id=org_id, @@ -686,15 +782,19 @@ async def create_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "OrgInvitation", + '201': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_invitation_serialize( self, org_id, @@ -707,18 +807,21 @@ def _create_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters # process the header parameters # process the form parameters @@ -726,24 +829,37 @@ def _create_invitation_serialize( if org_invitation_create is not None: _body_params = org_invitation_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/orgs/{org_id}/invitations", + method='POST', + resource_path='/api/orgs/{org_id}/invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -753,9 +869,12 @@ def _create_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_member( self, @@ -764,7 +883,10 @@ async def create_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -799,7 +921,7 @@ async def create_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( org_id=org_id, @@ -807,19 +929,23 @@ async def create_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "OwnerUserDetailed", + '201': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_member_with_http_info( self, @@ -828,7 +954,10 @@ async def create_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -863,7 +992,7 @@ async def create_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( org_id=org_id, @@ -871,19 +1000,23 @@ async def create_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "OwnerUserDetailed", + '201': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_member_without_preload_content( self, @@ -892,7 +1025,10 @@ async def create_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -927,7 +1063,7 @@ async def create_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( org_id=org_id, @@ -935,15 +1071,19 @@ async def create_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "OwnerUserDetailed", + '201': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_member_serialize( self, org_id, @@ -956,18 +1096,21 @@ def _create_member_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters # process the header parameters # process the form parameters @@ -975,24 +1118,37 @@ def _create_member_serialize( if org_member_create is not None: _body_params = org_member_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/orgs/{org_id}/members", + method='POST', + resource_path='/api/orgs/{org_id}/members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1002,9 +1158,12 @@ def _create_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def decline_invitation( self, @@ -1012,7 +1171,10 @@ async def decline_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1044,26 +1206,30 @@ async def decline_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def decline_invitation_with_http_info( self, @@ -1071,7 +1237,10 @@ async def decline_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1103,26 +1272,30 @@ async def decline_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def decline_invitation_without_preload_content( self, @@ -1130,7 +1303,10 @@ async def decline_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1162,22 +1338,26 @@ async def decline_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _decline_invitation_serialize( self, token, @@ -1189,29 +1369,37 @@ def _decline_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if token is not None: - _path_params["token"] = token + _path_params['token'] = token # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/orgs/invitation/{token}/decline", + method='DELETE', + resource_path='/api/orgs/invitation/{token}/decline', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1221,9 +1409,12 @@ def _decline_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -1231,7 +1422,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1264,26 +1458,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -1291,7 +1489,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1324,26 +1525,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -1351,7 +1556,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1384,22 +1592,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, org_id, @@ -1411,29 +1623,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/orgs/{org_id}", + method='DELETE', + resource_path='/api/orgs/{org_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1443,9 +1663,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_invitation( self, @@ -1454,7 +1677,10 @@ async def delete_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1488,7 +1714,7 @@ async def delete_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_invitation_serialize( org_id=org_id, @@ -1496,19 +1722,23 @@ async def delete_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_invitation_with_http_info( self, @@ -1517,7 +1747,10 @@ async def delete_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1551,7 +1784,7 @@ async def delete_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_invitation_serialize( org_id=org_id, @@ -1559,19 +1792,23 @@ async def delete_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_invitation_without_preload_content( self, @@ -1580,7 +1817,10 @@ async def delete_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1614,7 +1854,7 @@ async def delete_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_invitation_serialize( org_id=org_id, @@ -1622,15 +1862,19 @@ async def delete_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_invitation_serialize( self, org_id, @@ -1643,31 +1887,39 @@ def _delete_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if invitation_id is not None: - _path_params["invitation_id"] = invitation_id + _path_params['invitation_id'] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/orgs/{org_id}/invitations/{invitation_id}", + method='DELETE', + resource_path='/api/orgs/{org_id}/invitations/{invitation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1677,9 +1929,12 @@ def _delete_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_member( self, @@ -1688,7 +1943,10 @@ async def delete_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1722,7 +1980,7 @@ async def delete_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( org_id=org_id, @@ -1730,19 +1988,23 @@ async def delete_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_member_with_http_info( self, @@ -1751,7 +2013,10 @@ async def delete_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1785,7 +2050,7 @@ async def delete_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( org_id=org_id, @@ -1793,19 +2058,23 @@ async def delete_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_member_without_preload_content( self, @@ -1814,7 +2083,10 @@ async def delete_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1848,7 +2120,7 @@ async def delete_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( org_id=org_id, @@ -1856,15 +2128,19 @@ async def delete_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_member_serialize( self, org_id, @@ -1877,31 +2153,39 @@ def _delete_member_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/orgs/{org_id}/members/{user_id}", + method='DELETE', + resource_path='/api/orgs/{org_id}/members/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1911,9 +2195,12 @@ def _delete_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -1921,7 +2208,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1954,26 +2244,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Org", + '200': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -1981,7 +2275,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2014,26 +2311,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Org", + '200': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -2041,7 +2342,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2074,22 +2378,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Org", + '200': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, org_id, @@ -2101,33 +2409,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}", + method='GET', + resource_path='/api/orgs/{org_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2137,9 +2456,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_aggregated_usage( self, @@ -2149,7 +2471,10 @@ async def get_aggregated_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2186,7 +2511,7 @@ async def get_aggregated_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( org_id=org_id, @@ -2195,19 +2520,23 @@ async def get_aggregated_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AggregatedUsage", + '200': "AggregatedUsage", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_aggregated_usage_with_http_info( self, @@ -2217,7 +2546,10 @@ async def get_aggregated_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2254,7 +2586,7 @@ async def get_aggregated_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( org_id=org_id, @@ -2263,19 +2595,23 @@ async def get_aggregated_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AggregatedUsage", + '200': "AggregatedUsage", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_aggregated_usage_without_preload_content( self, @@ -2285,7 +2621,10 @@ async def get_aggregated_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2322,7 +2661,7 @@ async def get_aggregated_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( org_id=org_id, @@ -2331,15 +2670,19 @@ async def get_aggregated_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AggregatedUsage", + '200': "AggregatedUsage", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_aggregated_usage_serialize( self, org_id, @@ -2353,49 +2696,70 @@ def _get_aggregated_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/usage/aggregated", + method='GET', + resource_path='/api/orgs/{org_id}/usage/aggregated', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2405,9 +2769,12 @@ def _get_aggregated_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_daily_usage( self, @@ -2417,7 +2784,10 @@ async def get_daily_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2454,7 +2824,7 @@ async def get_daily_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( org_id=org_id, @@ -2463,19 +2833,23 @@ async def get_daily_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_daily_usage_with_http_info( self, @@ -2485,7 +2859,10 @@ async def get_daily_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2522,7 +2899,7 @@ async def get_daily_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( org_id=org_id, @@ -2531,19 +2908,23 @@ async def get_daily_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_daily_usage_without_preload_content( self, @@ -2553,7 +2934,10 @@ async def get_daily_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2590,7 +2974,7 @@ async def get_daily_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( org_id=org_id, @@ -2599,15 +2983,19 @@ async def get_daily_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_daily_usage_serialize( self, org_id, @@ -2621,49 +3009,70 @@ def _get_daily_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/usage/daily", + method='GET', + resource_path='/api/orgs/{org_id}/usage/daily', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2673,9 +3082,12 @@ def _get_daily_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_daily_user_usage( self, @@ -2686,7 +3098,10 @@ async def get_daily_user_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2725,7 +3140,7 @@ async def get_daily_user_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_user_usage_serialize( org_id=org_id, @@ -2735,19 +3150,23 @@ async def get_daily_user_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_daily_user_usage_with_http_info( self, @@ -2758,7 +3177,10 @@ async def get_daily_user_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2797,7 +3219,7 @@ async def get_daily_user_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_user_usage_serialize( org_id=org_id, @@ -2807,19 +3229,23 @@ async def get_daily_user_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_daily_user_usage_without_preload_content( self, @@ -2830,7 +3256,10 @@ async def get_daily_user_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2869,7 +3298,7 @@ async def get_daily_user_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_user_usage_serialize( org_id=org_id, @@ -2879,15 +3308,19 @@ async def get_daily_user_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DailyUsageList", + '200': "DailyUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_daily_user_usage_serialize( self, org_id, @@ -2902,51 +3335,72 @@ def _get_daily_user_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/members/{user_id}/usage/daily", + method='GET', + resource_path='/api/orgs/{org_id}/members/{user_id}/usage/daily', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2956,9 +3410,12 @@ def _get_daily_user_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_invitation( self, @@ -2967,7 +3424,10 @@ async def get_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3001,7 +3461,7 @@ async def get_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( org_id=org_id, @@ -3009,19 +3469,23 @@ async def get_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitation", + '200': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_invitation_with_http_info( self, @@ -3030,7 +3494,10 @@ async def get_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3064,7 +3531,7 @@ async def get_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( org_id=org_id, @@ -3072,19 +3539,23 @@ async def get_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitation", + '200': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_invitation_without_preload_content( self, @@ -3093,7 +3564,10 @@ async def get_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3127,7 +3601,7 @@ async def get_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( org_id=org_id, @@ -3135,15 +3609,19 @@ async def get_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitation", + '200': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_invitation_serialize( self, org_id, @@ -3156,35 +3634,46 @@ def _get_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if invitation_id is not None: - _path_params["invitation_id"] = invitation_id + _path_params['invitation_id'] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/invitations/{invitation_id}", + method='GET', + resource_path='/api/orgs/{org_id}/invitations/{invitation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3194,9 +3683,12 @@ def _get_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_member( self, @@ -3205,7 +3697,10 @@ async def get_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3239,7 +3734,7 @@ async def get_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_member_serialize( org_id=org_id, @@ -3247,19 +3742,23 @@ async def get_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUserDetailed", + '200': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_member_with_http_info( self, @@ -3268,7 +3767,10 @@ async def get_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3302,7 +3804,7 @@ async def get_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_member_serialize( org_id=org_id, @@ -3310,19 +3812,23 @@ async def get_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUserDetailed", + '200': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_member_without_preload_content( self, @@ -3331,7 +3837,10 @@ async def get_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3365,7 +3874,7 @@ async def get_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_member_serialize( org_id=org_id, @@ -3373,15 +3882,19 @@ async def get_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUserDetailed", + '200': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_member_serialize( self, org_id, @@ -3394,35 +3907,46 @@ def _get_member_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/members/{user_id}", + method='GET', + resource_path='/api/orgs/{org_id}/members/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3432,9 +3956,12 @@ def _get_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_owner_usage( self, @@ -3444,7 +3971,10 @@ async def get_owner_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3481,7 +4011,7 @@ async def get_owner_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_owner_usage_serialize( org_id=org_id, @@ -3490,19 +4020,23 @@ async def get_owner_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUsageList", + '200': "OwnerUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_owner_usage_with_http_info( self, @@ -3512,7 +4046,10 @@ async def get_owner_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3549,7 +4086,7 @@ async def get_owner_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_owner_usage_serialize( org_id=org_id, @@ -3558,19 +4095,23 @@ async def get_owner_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUsageList", + '200': "OwnerUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_owner_usage_without_preload_content( self, @@ -3580,7 +4121,10 @@ async def get_owner_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3617,7 +4161,7 @@ async def get_owner_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_owner_usage_serialize( org_id=org_id, @@ -3626,15 +4170,19 @@ async def get_owner_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUsageList", + '200': "OwnerUsageList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_owner_usage_serialize( self, org_id, @@ -3648,49 +4196,70 @@ def _get_owner_usage_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/usage/owners", + method='GET', + resource_path='/api/orgs/{org_id}/usage/owners', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3700,9 +4269,12 @@ def _get_owner_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_usage_limits( self, @@ -3710,7 +4282,10 @@ async def get_usage_limits( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3742,26 +4317,30 @@ async def get_usage_limits( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_limits_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_usage_limits_with_http_info( self, @@ -3769,7 +4348,10 @@ async def get_usage_limits_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3801,26 +4383,30 @@ async def get_usage_limits_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_limits_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_usage_limits_without_preload_content( self, @@ -3828,7 +4414,10 @@ async def get_usage_limits_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3860,22 +4449,26 @@ async def get_usage_limits_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_limits_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsageLimits", + '200': "UsageLimits", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_usage_limits_serialize( self, org_id, @@ -3887,33 +4480,44 @@ def _get_usage_limits_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/limits", + method='GET', + resource_path='/api/orgs/{org_id}/limits', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3923,34 +4527,28 @@ def _get_usage_limits_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on org name.") - ] = None, - all_orgs: Annotated[ - Optional[StrictBool], - Field( - description="List all orgs, instead of only orgs the user is a member of. (Admin only)" - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on org name.")] = None, + all_orgs: Annotated[Optional[StrictBool], Field(description="List all orgs, instead of only orgs the user is a member of. (Admin only)")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3961,7 +4559,7 @@ async def list( Paginated list of orgs. - :param name: Prefix matched search string on org name. + :param name: Substring matched search string on org name. :type name: str :param all_orgs: List all orgs, instead of only orgs the user is a member of. (Admin only) :type all_orgs: bool @@ -3993,7 +4591,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -4005,44 +4603,39 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgList", + '200': "OrgList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on org name.") - ] = None, - all_orgs: Annotated[ - Optional[StrictBool], - Field( - description="List all orgs, instead of only orgs the user is a member of. (Admin only)" - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on org name.")] = None, + all_orgs: Annotated[Optional[StrictBool], Field(description="List all orgs, instead of only orgs the user is a member of. (Admin only)")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4053,7 +4646,7 @@ async def list_with_http_info( Paginated list of orgs. - :param name: Prefix matched search string on org name. + :param name: Substring matched search string on org name. :type name: str :param all_orgs: List all orgs, instead of only orgs the user is a member of. (Admin only) :type all_orgs: bool @@ -4085,7 +4678,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -4097,44 +4690,39 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgList", + '200': "OrgList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on org name.") - ] = None, - all_orgs: Annotated[ - Optional[StrictBool], - Field( - description="List all orgs, instead of only orgs the user is a member of. (Admin only)" - ), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on org name.")] = None, + all_orgs: Annotated[Optional[StrictBool], Field(description="List all orgs, instead of only orgs the user is a member of. (Admin only)")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4145,7 +4733,7 @@ async def list_without_preload_content( Paginated list of orgs. - :param name: Prefix matched search string on org name. + :param name: Substring matched search string on org name. :type name: str :param all_orgs: List all orgs, instead of only orgs the user is a member of. (Admin only) :type all_orgs: bool @@ -4177,7 +4765,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -4189,15 +4777,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgList", + '200': "OrgList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, name, @@ -4214,55 +4806,66 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if all_orgs is not None: - - _query_params.append(("all_orgs", all_orgs)) - + + _query_params.append(('all_orgs', all_orgs)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs", + method='GET', + resource_path='/api/orgs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4272,35 +4875,30 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_invitations( self, org_id: StrictStr, - status: Annotated[ - Optional[InvitationStatus], Field(description="Filter org invitations by status.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on email.") - ] = None, - invitor_id: Annotated[ - Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") - ] = None, + status: Annotated[Optional[InvitationStatus], Field(description="Filter org invitations by status.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, + invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4314,7 +4912,7 @@ async def list_invitations( :type org_id: str :param status: Filter org invitations by status. :type status: InvitationStatus - :param email: Prefix matched search string on email. + :param email: Substring matched search string on email. :type email: str :param invitor_id: Filter invitations by invitor user ID. :type invitor_id: str @@ -4346,7 +4944,7 @@ async def list_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_invitations_serialize( org_id=org_id, @@ -4360,45 +4958,41 @@ async def list_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitationList", + '200': "OrgInvitationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_invitations_with_http_info( self, org_id: StrictStr, - status: Annotated[ - Optional[InvitationStatus], Field(description="Filter org invitations by status.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on email.") - ] = None, - invitor_id: Annotated[ - Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") - ] = None, + status: Annotated[Optional[InvitationStatus], Field(description="Filter org invitations by status.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, + invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4412,7 +5006,7 @@ async def list_invitations_with_http_info( :type org_id: str :param status: Filter org invitations by status. :type status: InvitationStatus - :param email: Prefix matched search string on email. + :param email: Substring matched search string on email. :type email: str :param invitor_id: Filter invitations by invitor user ID. :type invitor_id: str @@ -4444,7 +5038,7 @@ async def list_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_invitations_serialize( org_id=org_id, @@ -4458,45 +5052,41 @@ async def list_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitationList", + '200': "OrgInvitationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_invitations_without_preload_content( self, org_id: StrictStr, - status: Annotated[ - Optional[InvitationStatus], Field(description="Filter org invitations by status.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on email.") - ] = None, - invitor_id: Annotated[ - Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") - ] = None, + status: Annotated[Optional[InvitationStatus], Field(description="Filter org invitations by status.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, + invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4510,7 +5100,7 @@ async def list_invitations_without_preload_content( :type org_id: str :param status: Filter org invitations by status. :type status: InvitationStatus - :param email: Prefix matched search string on email. + :param email: Substring matched search string on email. :type email: str :param invitor_id: Filter invitations by invitor user ID. :type invitor_id: str @@ -4542,7 +5132,7 @@ async def list_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_invitations_serialize( org_id=org_id, @@ -4556,15 +5146,19 @@ async def list_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitationList", + '200': "OrgInvitationList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_invitations_serialize( self, org_id, @@ -4583,61 +5177,72 @@ def _list_invitations_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters if status is not None: - - _query_params.append(("status", status.value)) - + + _query_params.append(('status', status.value)) + if email is not None: - - _query_params.append(("email", email)) - + + _query_params.append(('email', email)) + if invitor_id is not None: - - _query_params.append(("invitor_id", invitor_id)) - + + _query_params.append(('invitor_id', invitor_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/invitations", + method='GET', + resource_path='/api/orgs/{org_id}/invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4647,46 +5252,32 @@ def _list_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_owners( self, org_id: StrictStr, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string by owner identity name."), - ] = None, - identity_type: Annotated[ - Optional[IdentityType], Field(description="Filter owners by identity type.") - ] = None, - all_users: Annotated[ - Optional[StrictBool], - Field(description="List all user owners, instead of just the authenticated user."), - ] = None, - all_groups: Annotated[ - Optional[StrictBool], - Field( - description="List all group owners, instead of just groups the authenticated user is a member of." - ), - ] = None, - details: Annotated[ - Optional[StrictBool], Field(description="Retrieve detailed owner response.") - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string by owner identity name.")] = None, + identity_type: Annotated[Optional[IdentityType], Field(description="Filter owners by identity type.")] = None, + all_users: Annotated[Optional[StrictBool], Field(description="List all user owners, instead of just the authenticated user.")] = None, + all_groups: Annotated[Optional[StrictBool], Field(description="List all group owners, instead of just groups the authenticated user is a member of.")] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed owner response.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4699,7 +5290,7 @@ async def list_owners( :param org_id: (required) :type org_id: str - :param name: Prefix matched search string by owner identity name. + :param name: Substring matched search string by owner identity name. :type name: str :param identity_type: Filter owners by identity type. :type identity_type: IdentityType @@ -4737,7 +5328,7 @@ async def list_owners( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( org_id=org_id, @@ -4753,56 +5344,43 @@ async def list_owners( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgsListOwners200Response", + '200': "OrgsListOwners200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_owners_with_http_info( self, org_id: StrictStr, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string by owner identity name."), - ] = None, - identity_type: Annotated[ - Optional[IdentityType], Field(description="Filter owners by identity type.") - ] = None, - all_users: Annotated[ - Optional[StrictBool], - Field(description="List all user owners, instead of just the authenticated user."), - ] = None, - all_groups: Annotated[ - Optional[StrictBool], - Field( - description="List all group owners, instead of just groups the authenticated user is a member of." - ), - ] = None, - details: Annotated[ - Optional[StrictBool], Field(description="Retrieve detailed owner response.") - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string by owner identity name.")] = None, + identity_type: Annotated[Optional[IdentityType], Field(description="Filter owners by identity type.")] = None, + all_users: Annotated[Optional[StrictBool], Field(description="List all user owners, instead of just the authenticated user.")] = None, + all_groups: Annotated[Optional[StrictBool], Field(description="List all group owners, instead of just groups the authenticated user is a member of.")] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed owner response.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4815,7 +5393,7 @@ async def list_owners_with_http_info( :param org_id: (required) :type org_id: str - :param name: Prefix matched search string by owner identity name. + :param name: Substring matched search string by owner identity name. :type name: str :param identity_type: Filter owners by identity type. :type identity_type: IdentityType @@ -4853,7 +5431,7 @@ async def list_owners_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( org_id=org_id, @@ -4869,56 +5447,43 @@ async def list_owners_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgsListOwners200Response", + '200': "OrgsListOwners200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_owners_without_preload_content( self, org_id: StrictStr, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string by owner identity name."), - ] = None, - identity_type: Annotated[ - Optional[IdentityType], Field(description="Filter owners by identity type.") - ] = None, - all_users: Annotated[ - Optional[StrictBool], - Field(description="List all user owners, instead of just the authenticated user."), - ] = None, - all_groups: Annotated[ - Optional[StrictBool], - Field( - description="List all group owners, instead of just groups the authenticated user is a member of." - ), - ] = None, - details: Annotated[ - Optional[StrictBool], Field(description="Retrieve detailed owner response.") - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string by owner identity name.")] = None, + identity_type: Annotated[Optional[IdentityType], Field(description="Filter owners by identity type.")] = None, + all_users: Annotated[Optional[StrictBool], Field(description="List all user owners, instead of just the authenticated user.")] = None, + all_groups: Annotated[Optional[StrictBool], Field(description="List all group owners, instead of just groups the authenticated user is a member of.")] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed owner response.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4931,7 +5496,7 @@ async def list_owners_without_preload_content( :param org_id: (required) :type org_id: str - :param name: Prefix matched search string by owner identity name. + :param name: Substring matched search string by owner identity name. :type name: str :param identity_type: Filter owners by identity type. :type identity_type: IdentityType @@ -4969,7 +5534,7 @@ async def list_owners_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( org_id=org_id, @@ -4985,15 +5550,19 @@ async def list_owners_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgsListOwners200Response", + '200': "OrgsListOwners200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_owners_serialize( self, org_id, @@ -5014,69 +5583,80 @@ def _list_owners_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if identity_type is not None: - - _query_params.append(("identity_type", identity_type.value)) - + + _query_params.append(('identity_type', identity_type.value)) + if all_users is not None: - - _query_params.append(("all_users", all_users)) - + + _query_params.append(('all_users', all_users)) + if all_groups is not None: - - _query_params.append(("all_groups", all_groups)) - + + _query_params.append(('all_groups', all_groups)) + if details is not None: - - _query_params.append(("details", details)) - + + _query_params.append(('details', details)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/orgs/{org_id}/owners", + method='GET', + resource_path='/api/orgs/{org_id}/owners', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5086,9 +5666,12 @@ def _list_owners_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -5097,7 +5680,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5132,7 +5718,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( org_id=org_id, @@ -5140,19 +5726,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Org", + '200': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -5161,7 +5751,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5196,7 +5789,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( org_id=org_id, @@ -5204,19 +5797,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Org", + '200': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -5225,7 +5822,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5260,7 +5860,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( org_id=org_id, @@ -5268,15 +5868,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Org", + '200': "Org", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, org_id, @@ -5289,18 +5893,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id # process the query parameters # process the header parameters # process the form parameters @@ -5308,24 +5915,37 @@ def _update_serialize( if org_update is not None: _body_params = org_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/orgs/{org_id}", + method='PATCH', + resource_path='/api/orgs/{org_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5335,9 +5955,12 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_invitation( self, @@ -5347,7 +5970,10 @@ async def update_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5383,7 +6009,7 @@ async def update_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( org_id=org_id, @@ -5392,19 +6018,23 @@ async def update_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitation", + '200': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_invitation_with_http_info( self, @@ -5414,7 +6044,10 @@ async def update_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5450,7 +6083,7 @@ async def update_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( org_id=org_id, @@ -5459,19 +6092,23 @@ async def update_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitation", + '200': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_invitation_without_preload_content( self, @@ -5481,7 +6118,10 @@ async def update_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5517,7 +6157,7 @@ async def update_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( org_id=org_id, @@ -5526,15 +6166,19 @@ async def update_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OrgInvitation", + '200': "OrgInvitation", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_invitation_serialize( self, org_id, @@ -5548,20 +6192,23 @@ def _update_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if invitation_id is not None: - _path_params["invitation_id"] = invitation_id + _path_params['invitation_id'] = invitation_id # process the query parameters # process the header parameters # process the form parameters @@ -5569,24 +6216,37 @@ def _update_invitation_serialize( if org_invitation_update is not None: _body_params = org_invitation_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/orgs/{org_id}/invitations/{invitation_id}", + method='PATCH', + resource_path='/api/orgs/{org_id}/invitations/{invitation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5596,9 +6256,12 @@ def _update_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_member( self, @@ -5608,7 +6271,10 @@ async def update_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5644,7 +6310,7 @@ async def update_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_member_serialize( org_id=org_id, @@ -5653,19 +6319,23 @@ async def update_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUserDetailed", + '200': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_member_with_http_info( self, @@ -5675,7 +6345,10 @@ async def update_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5711,7 +6384,7 @@ async def update_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_member_serialize( org_id=org_id, @@ -5720,19 +6393,23 @@ async def update_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUserDetailed", + '200': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_member_without_preload_content( self, @@ -5742,7 +6419,10 @@ async def update_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5778,7 +6458,7 @@ async def update_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_member_serialize( org_id=org_id, @@ -5787,15 +6467,19 @@ async def update_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OwnerUserDetailed", + '200': "OwnerUserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_member_serialize( self, org_id, @@ -5809,20 +6493,23 @@ def _update_member_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params["org_id"] = org_id + _path_params['org_id'] = org_id if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -5830,24 +6517,37 @@ def _update_member_serialize( if org_member_update is not None: _body_params = org_member_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/orgs/{org_id}/members/{user_id}", + method='PATCH', + resource_path='/api/orgs/{org_id}/members/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5857,5 +6557,7 @@ def _update_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/recipes_api.py b/saturn_api/api/recipes_api.py index 1a26595..1aa0ce7 100644 --- a/saturn_api/api/recipes_api.py +++ b/saturn_api/api/recipes_api.py @@ -1,33 +1,28 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional from typing_extensions import Annotated +from saturn_api.models.recipe import Recipe +from saturn_api.models.recipe_list import RecipeList from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse -from saturn_api.models.recipe import Recipe -from saturn_api.models.recipe_list import RecipeList from saturn_api.rest import RESTResponseType @@ -43,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def apply( self, @@ -50,7 +46,10 @@ async def apply( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,26 +81,30 @@ async def apply( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._apply_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Recipe", + '201': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def apply_with_http_info( self, @@ -109,7 +112,10 @@ async def apply_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -141,26 +147,30 @@ async def apply_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._apply_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Recipe", + '201': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def apply_without_preload_content( self, @@ -168,7 +178,10 @@ async def apply_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -200,22 +213,26 @@ async def apply_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._apply_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Recipe", + '201': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _apply_serialize( self, recipe, @@ -227,13 +244,16 @@ def _apply_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -244,24 +264,37 @@ def _apply_serialize( if recipe is not None: _body_params = recipe + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/api/recipes", + method='PUT', + resource_path='/api/recipes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -271,9 +304,12 @@ def _apply_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create( self, @@ -281,7 +317,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -314,26 +353,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Recipe", + '201': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -341,7 +384,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -374,26 +420,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Recipe", + '201': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -401,7 +451,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -434,22 +487,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Recipe", + '201': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, recipe, @@ -461,13 +518,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -478,24 +538,37 @@ def _create_serialize( if recipe is not None: _body_params = recipe + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/recipes", + method='POST', + resource_path='/api/recipes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -505,38 +578,31 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, recipe_type: StrictStr, name: StrictStr, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, as_template: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -584,7 +650,7 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( recipe_type=recipe_type, @@ -599,48 +665,42 @@ async def get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Recipe", + '200': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, recipe_type: StrictStr, name: StrictStr, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, as_template: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -688,7 +748,7 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( recipe_type=recipe_type, @@ -703,48 +763,42 @@ async def get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Recipe", + '200': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, recipe_type: StrictStr, name: StrictStr, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, as_template: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -792,7 +846,7 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( recipe_type=recipe_type, @@ -807,15 +861,19 @@ async def get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Recipe", + '200': "Recipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, recipe_type, @@ -835,63 +893,74 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if recipe_type is not None: - _path_params["recipe_type"] = recipe_type + _path_params['recipe_type'] = recipe_type if name is not None: - _path_params["name"] = name + _path_params['name'] = name # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if as_template is not None: - - _query_params.append(("as_template", as_template)) - + + _query_params.append(('as_template', as_template)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/recipes/{recipe_type}/{name}", + method='GET', + resource_path='/api/recipes/{recipe_type}/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -901,47 +970,35 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, type: Optional[StrictStr] = None, name: Optional[StrictStr] = None, as_template: Optional[StrictBool] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -998,7 +1055,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1017,57 +1074,46 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RecipeList", + '200': "RecipeList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, type: Optional[StrictStr] = None, name: Optional[StrictStr] = None, as_template: Optional[StrictBool] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1124,7 +1170,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1143,57 +1189,46 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RecipeList", + '200': "RecipeList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, type: Optional[StrictStr] = None, name: Optional[StrictStr] = None, as_template: Optional[StrictBool] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1250,7 +1285,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1269,15 +1304,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RecipeList", + '200': "RecipeList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -1301,83 +1340,94 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if type is not None: - - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if as_template is not None: - - _query_params.append(("as_template", as_template)) - + + _query_params.append(('as_template', as_template)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/recipes", + method='GET', + resource_path='/api/recipes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1387,5 +1437,7 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/secrets_api.py b/saturn_api/api/secrets_api.py index 0814dbf..a0d48c5 100644 --- a/saturn_api/api/secrets_api.py +++ b/saturn_api/api/secrets_api.py @@ -1,36 +1,31 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.secret import Secret from saturn_api.models.secret_access_level import SecretAccessLevel from saturn_api.models.secret_create import SecretCreate from saturn_api.models.secret_list import SecretList from saturn_api.models.secret_update import SecretUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -46,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -53,7 +49,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -86,26 +85,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( secret_create=secret_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Secret", + '201': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -113,7 +116,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,26 +152,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( secret_create=secret_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Secret", + '201': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -173,7 +183,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -206,22 +219,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( secret_create=secret_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Secret", + '201': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, secret_create, @@ -233,13 +250,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -250,24 +270,37 @@ def _create_serialize( if secret_create is not None: _body_params = secret_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/secrets", + method='POST', + resource_path='/api/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -277,9 +310,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -287,7 +323,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -320,26 +359,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -347,7 +390,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -380,26 +426,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -407,7 +457,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -440,22 +493,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, secret_id, @@ -467,29 +524,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if secret_id is not None: - _path_params["secret_id"] = secret_id + _path_params['secret_id'] = secret_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/secrets/{secret_id}", + method='DELETE', + resource_path='/api/secrets/{secret_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -499,9 +564,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -509,7 +577,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -542,26 +613,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Secret", + '200': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -569,7 +644,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -602,26 +680,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Secret", + '200': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -629,7 +711,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -662,22 +747,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Secret", + '200': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, secret_id, @@ -689,33 +778,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if secret_id is not None: - _path_params["secret_id"] = secret_id + _path_params['secret_id'] = secret_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/secrets/{secret_id}", + method='GET', + resource_path='/api/secrets/{secret_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -725,50 +825,34 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on secret name.") - ] = None, - access: Annotated[ - Optional[SecretAccessLevel], Field(description="Filter secrets by access level.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret name.")] = None, + access: Annotated[Optional[SecretAccessLevel], Field(description="Filter secrets by access level.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -791,7 +875,7 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on secret name. + :param name: Substring matched search string on secret name. :type name: str :param access: Filter secrets by access level. :type access: SecretAccessLevel @@ -823,7 +907,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -841,60 +925,45 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretList", + '200': "SecretList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on secret name.") - ] = None, - access: Annotated[ - Optional[SecretAccessLevel], Field(description="Filter secrets by access level.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret name.")] = None, + access: Annotated[Optional[SecretAccessLevel], Field(description="Filter secrets by access level.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -917,7 +986,7 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on secret name. + :param name: Substring matched search string on secret name. :type name: str :param access: Filter secrets by access level. :type access: SecretAccessLevel @@ -949,7 +1018,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -967,60 +1036,45 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretList", + '200': "SecretList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on secret name.") - ] = None, - access: Annotated[ - Optional[SecretAccessLevel], Field(description="Filter secrets by access level.") - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret name.")] = None, + access: Annotated[Optional[SecretAccessLevel], Field(description="Filter secrets by access level.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1043,7 +1097,7 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on secret name. + :param name: Substring matched search string on secret name. :type name: str :param access: Filter secrets by access level. :type access: SecretAccessLevel @@ -1075,7 +1129,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1093,15 +1147,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretList", + '200': "SecretList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -1124,79 +1182,90 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if access is not None: - - _query_params.append(("access", access.value)) - + + _query_params.append(('access', access.value)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/secrets", + method='GET', + resource_path='/api/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1206,9 +1275,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1217,7 +1289,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1252,7 +1327,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( secret_id=secret_id, @@ -1260,19 +1335,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Secret", + '200': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1281,7 +1360,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1316,7 +1398,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( secret_id=secret_id, @@ -1324,19 +1406,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Secret", + '200': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1345,7 +1431,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1380,7 +1469,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( secret_id=secret_id, @@ -1388,15 +1477,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Secret", + '200': "Secret", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, secret_id, @@ -1409,18 +1502,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if secret_id is not None: - _path_params["secret_id"] = secret_id + _path_params['secret_id'] = secret_id # process the query parameters # process the header parameters # process the form parameters @@ -1428,24 +1524,37 @@ def _update_serialize( if secret_update is not None: _body_params = secret_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/secrets/{secret_id}", + method='PATCH', + resource_path='/api/secrets/{secret_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1455,5 +1564,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/service_account_entitlements_api.py b/saturn_api/api/service_account_entitlements_api.py index 084e324..b929d6f 100644 --- a/saturn_api/api/service_account_entitlements_api.py +++ b/saturn_api/api/service_account_entitlements_api.py @@ -1,38 +1,29 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional from typing_extensions import Annotated +from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement +from saturn_api.models.service_account_entitlement_create import ServiceAccountEntitlementCreate +from saturn_api.models.service_account_entitlement_list import ServiceAccountEntitlementList from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse -from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement -from saturn_api.models.service_account_entitlement_create import ( - ServiceAccountEntitlementCreate, -) -from saturn_api.models.service_account_entitlement_list import ( - ServiceAccountEntitlementList, -) from saturn_api.rest import RESTResponseType @@ -48,6 +39,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -55,7 +47,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,26 +83,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_entitlement_create=service_account_entitlement_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountEntitlement", + '201': "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -115,7 +114,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,26 +150,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_entitlement_create=service_account_entitlement_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountEntitlement", + '201': "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -175,7 +181,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -208,22 +217,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_entitlement_create=service_account_entitlement_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountEntitlement", + '201': "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, service_account_entitlement_create, @@ -235,13 +248,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -252,24 +268,37 @@ def _create_serialize( if service_account_entitlement_create is not None: _body_params = service_account_entitlement_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/service_account_entitlements", + method='POST', + resource_path='/api/service_account_entitlements', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -279,9 +308,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -289,7 +321,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -322,26 +357,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -349,7 +388,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -382,26 +424,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -409,7 +455,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -442,22 +491,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, service_account_entitlement_id, @@ -469,29 +522,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_entitlement_id is not None: - _path_params["service_account_entitlement_id"] = service_account_entitlement_id + _path_params['service_account_entitlement_id'] = service_account_entitlement_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/service_account_entitlements/{service_account_entitlement_id}", + method='DELETE', + resource_path='/api/service_account_entitlements/{service_account_entitlement_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -501,9 +562,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -511,7 +575,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -544,26 +611,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountEntitlement", + '200': "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -571,7 +642,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -604,26 +678,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountEntitlement", + '200': "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -631,7 +709,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -664,22 +745,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountEntitlement", + '200': "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, service_account_entitlement_id, @@ -691,33 +776,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_entitlement_id is not None: - _path_params["service_account_entitlement_id"] = service_account_entitlement_id + _path_params['service_account_entitlement_id'] = service_account_entitlement_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/service_account_entitlements/{service_account_entitlement_id}", + method='GET', + resource_path='/api/service_account_entitlements/{service_account_entitlement_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -727,39 +823,30 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on entitled service account name."), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on entitled service account name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -776,7 +863,7 @@ async def list( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on entitled service account name. + :param name: Substring matched search string on entitled service account name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -806,7 +893,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -820,49 +907,41 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountEntitlementList", + '200': "ServiceAccountEntitlementList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on entitled service account name."), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on entitled service account name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -879,7 +958,7 @@ async def list_with_http_info( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on entitled service account name. + :param name: Substring matched search string on entitled service account name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -909,7 +988,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -923,49 +1002,41 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountEntitlementList", + '200': "ServiceAccountEntitlementList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on entitled service account name."), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on entitled service account name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -982,7 +1053,7 @@ async def list_without_preload_content( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on entitled service account name. + :param name: Substring matched search string on entitled service account name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -1012,7 +1083,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1026,15 +1097,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountEntitlementList", + '200': "ServiceAccountEntitlementList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, user_id, @@ -1053,63 +1128,74 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if identity is not None: - - _query_params.append(("identity", identity)) - + + _query_params.append(('identity', identity)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/service_account_entitlements", + method='GET', + resource_path='/api/service_account_entitlements', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1119,5 +1205,7 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/service_accounts_api.py b/saturn_api/api/service_accounts_api.py index 2aad4da..d64e7c7 100644 --- a/saturn_api/api/service_accounts_api.py +++ b/saturn_api/api/service_accounts_api.py @@ -1,27 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.service_account import ServiceAccount from saturn_api.models.service_account_create import ServiceAccountCreate from saturn_api.models.service_account_list import ServiceAccountList from saturn_api.models.service_account_update import ServiceAccountUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -37,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -44,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_create=service_account_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccount", + '201': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -104,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -137,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_create=service_account_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccount", + '201': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -164,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -197,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_create=service_account_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccount", + '201': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, service_account_create, @@ -224,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -241,24 +269,37 @@ def _create_serialize( if service_account_create is not None: _body_params = service_account_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/service_accounts", + method='POST', + resource_path='/api/service_accounts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -268,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -278,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -311,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -338,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -371,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -398,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -431,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, service_account_id, @@ -458,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_id is not None: - _path_params["service_account_id"] = service_account_id + _path_params['service_account_id'] = service_account_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/service_accounts/{service_account_id}", + method='DELETE', + resource_path='/api/service_accounts/{service_account_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -490,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -500,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -533,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccount", + '200': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -560,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -593,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccount", + '200': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -620,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -653,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccount", + '200': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, service_account_id, @@ -680,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_id is not None: - _path_params["service_account_id"] = service_account_id + _path_params['service_account_id'] = service_account_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/service_accounts/{service_account_id}", + method='GET', + resource_path='/api/service_accounts/{service_account_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -716,29 +824,27 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on service account name."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on service account name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -749,7 +855,7 @@ async def list( Paginated list of service accounts. - :param name: Prefix matched search string on service account name. + :param name: Substring matched search string on service account name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -779,7 +885,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -790,39 +896,38 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountList", + '200': "ServiceAccountList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on service account name."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on service account name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -833,7 +938,7 @@ async def list_with_http_info( Paginated list of service accounts. - :param name: Prefix matched search string on service account name. + :param name: Substring matched search string on service account name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -863,7 +968,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -874,39 +979,38 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountList", + '200': "ServiceAccountList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on service account name."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on service account name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -917,7 +1021,7 @@ async def list_without_preload_content( Paginated list of service accounts. - :param name: Prefix matched search string on service account name. + :param name: Substring matched search string on service account name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -947,7 +1051,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -958,15 +1062,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountList", + '200': "ServiceAccountList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, name, @@ -982,51 +1090,62 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/service_accounts", + method='GET', + resource_path='/api/service_accounts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1036,9 +1155,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1047,7 +1169,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1082,7 +1207,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( service_account_id=service_account_id, @@ -1090,19 +1215,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccount", + '200': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1111,7 +1240,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1146,7 +1278,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( service_account_id=service_account_id, @@ -1154,19 +1286,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccount", + '200': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1175,7 +1311,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1210,7 +1349,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( service_account_id=service_account_id, @@ -1218,15 +1357,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccount", + '200': "ServiceAccount", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, service_account_id, @@ -1239,18 +1382,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_id is not None: - _path_params["service_account_id"] = service_account_id + _path_params['service_account_id'] = service_account_id # process the query parameters # process the header parameters # process the form parameters @@ -1258,24 +1404,37 @@ def _update_serialize( if service_account_update is not None: _body_params = service_account_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/service_accounts/{service_account_id}", + method='PATCH', + resource_path='/api/service_accounts/{service_account_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1285,5 +1444,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/shared_folder_attachments_api.py b/saturn_api/api/shared_folder_attachments_api.py index 8fc636d..ec69639 100644 --- a/saturn_api/api/shared_folder_attachments_api.py +++ b/saturn_api/api/shared_folder_attachments_api.py @@ -1,31 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +from pydantic import Field, StrictBool, StrictStr +from typing import Optional from typing_extensions import Annotated +from saturn_api.models.shared_folder_attachment import SharedFolderAttachment +from saturn_api.models.shared_folder_attachment_create import SharedFolderAttachmentCreate +from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList +from saturn_api.models.shared_folder_attachment_update import SharedFolderAttachmentUpdate from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse -from saturn_api.models.shared_folder_attachment import SharedFolderAttachment -from saturn_api.models.shared_folder_attachment_create import ( - SharedFolderAttachmentCreate, -) -from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList -from saturn_api.models.shared_folder_attachment_update import ( - SharedFolderAttachmentUpdate, -) from saturn_api.rest import RESTResponseType @@ -41,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -48,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -81,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_attachment_create=shared_folder_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SharedFolderAttachment", + '201': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -108,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -141,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_attachment_create=shared_folder_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SharedFolderAttachment", + '201': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -168,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -201,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_attachment_create=shared_folder_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SharedFolderAttachment", + '201': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, shared_folder_attachment_create, @@ -228,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -245,24 +269,37 @@ def _create_serialize( if shared_folder_attachment_create is not None: _body_params = shared_folder_attachment_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/shared_folder_attachments", + method='POST', + resource_path='/api/shared_folder_attachments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -272,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -282,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -315,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -342,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -375,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -402,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -435,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, shared_folder_attachment_id, @@ -462,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_attachment_id is not None: - _path_params["shared_folder_attachment_id"] = shared_folder_attachment_id + _path_params['shared_folder_attachment_id'] = shared_folder_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/shared_folder_attachments/{shared_folder_attachment_id}", + method='DELETE', + resource_path='/api/shared_folder_attachments/{shared_folder_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -494,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -504,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -537,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachment", + '200': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -564,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachment", + '200': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -624,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -657,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachment", + '200': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, shared_folder_attachment_id, @@ -684,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_attachment_id is not None: - _path_params["shared_folder_attachment_id"] = shared_folder_attachment_id + _path_params['shared_folder_attachment_id'] = shared_folder_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/shared_folder_attachments/{shared_folder_attachment_id}", + method='GET', + resource_path='/api/shared_folder_attachments/{shared_folder_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -720,32 +824,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="Reference by deployment ID.") - ] = None, - workspace_id: Annotated[ - Optional[StrictStr], Field(description="Reference by workspace ID.") - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, + workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -790,7 +891,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -803,42 +904,40 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachmentList", + '200': "SharedFolderAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="Reference by deployment ID.") - ] = None, - workspace_id: Annotated[ - Optional[StrictStr], Field(description="Reference by workspace ID.") - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, + workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -883,7 +982,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -896,42 +995,40 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachmentList", + '200': "SharedFolderAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="Reference by deployment ID.") - ] = None, - workspace_id: Annotated[ - Optional[StrictStr], Field(description="Reference by workspace ID.") - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, + workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -976,7 +1073,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -989,15 +1086,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachmentList", + '200': "SharedFolderAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, job_id, @@ -1015,59 +1116,70 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if job_id is not None: - - _query_params.append(("job_id", job_id)) - + + _query_params.append(('job_id', job_id)) + if deployment_id is not None: - - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if workspace_id is not None: - - _query_params.append(("workspace_id", workspace_id)) - + + _query_params.append(('workspace_id', workspace_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/shared_folder_attachments", + method='GET', + resource_path='/api/shared_folder_attachments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1077,9 +1189,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1088,7 +1203,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1123,7 +1241,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_attachment_id=shared_folder_attachment_id, @@ -1131,19 +1249,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachment", + '200': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1152,7 +1274,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1187,7 +1312,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_attachment_id=shared_folder_attachment_id, @@ -1195,19 +1320,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachment", + '200': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1216,7 +1345,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1251,7 +1383,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_attachment_id=shared_folder_attachment_id, @@ -1259,15 +1391,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderAttachment", + '200': "SharedFolderAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, shared_folder_attachment_id, @@ -1280,18 +1416,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_attachment_id is not None: - _path_params["shared_folder_attachment_id"] = shared_folder_attachment_id + _path_params['shared_folder_attachment_id'] = shared_folder_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -1299,24 +1438,37 @@ def _update_serialize( if shared_folder_attachment_update is not None: _body_params = shared_folder_attachment_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/shared_folder_attachments/{shared_folder_attachment_id}", + method='PATCH', + resource_path='/api/shared_folder_attachments/{shared_folder_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1326,5 +1478,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/shared_folders_api.py b/saturn_api/api/shared_folders_api.py index 8a79c91..74a4fdb 100644 --- a/saturn_api/api/shared_folders_api.py +++ b/saturn_api/api/shared_folders_api.py @@ -1,36 +1,31 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.shared_folder import SharedFolder from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel from saturn_api.models.shared_folder_create import SharedFolderCreate from saturn_api.models.shared_folder_list import SharedFolderList from saturn_api.models.shared_folder_update import SharedFolderUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -46,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -53,7 +49,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -86,26 +85,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_create=shared_folder_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SharedFolder", + '201': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -113,7 +116,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,26 +152,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_create=shared_folder_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SharedFolder", + '201': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -173,7 +183,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -206,22 +219,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_create=shared_folder_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SharedFolder", + '201': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, shared_folder_create, @@ -233,13 +250,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -250,24 +270,37 @@ def _create_serialize( if shared_folder_create is not None: _body_params = shared_folder_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/shared_folders", + method='POST', + resource_path='/api/shared_folders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -277,9 +310,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -287,7 +323,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -320,26 +359,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -347,7 +390,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -380,26 +426,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -407,7 +457,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -440,22 +493,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, shared_folder_id, @@ -467,29 +524,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_id is not None: - _path_params["shared_folder_id"] = shared_folder_id + _path_params['shared_folder_id'] = shared_folder_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/shared_folders/{shared_folder_id}", + method='DELETE', + resource_path='/api/shared_folders/{shared_folder_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -499,9 +564,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -509,7 +577,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -542,26 +613,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolder", + '200': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -569,7 +644,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -602,26 +680,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolder", + '200': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -629,7 +711,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -662,22 +747,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolder", + '200': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, shared_folder_id, @@ -689,33 +778,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_id is not None: - _path_params["shared_folder_id"] = shared_folder_id + _path_params['shared_folder_id'] = shared_folder_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/shared_folders/{shared_folder_id}", + method='GET', + resource_path='/api/shared_folders/{shared_folder_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -725,52 +825,34 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on shared folder name."), - ] = None, - access: Annotated[ - Optional[SharedFolderAccessLevel], - Field(description="Filter shared folders by access level."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on shared folder name.")] = None, + access: Annotated[Optional[SharedFolderAccessLevel], Field(description="Filter shared folders by access level.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -793,7 +875,7 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on shared folder name. + :param name: Substring matched search string on shared folder name. :type name: str :param access: Filter shared folders by access level. :type access: SharedFolderAccessLevel @@ -825,7 +907,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -843,62 +925,45 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderList", + '200': "SharedFolderList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on shared folder name."), - ] = None, - access: Annotated[ - Optional[SharedFolderAccessLevel], - Field(description="Filter shared folders by access level."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on shared folder name.")] = None, + access: Annotated[Optional[SharedFolderAccessLevel], Field(description="Filter shared folders by access level.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -921,7 +986,7 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on shared folder name. + :param name: Substring matched search string on shared folder name. :type name: str :param access: Filter shared folders by access level. :type access: SharedFolderAccessLevel @@ -953,7 +1018,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -971,62 +1036,45 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderList", + '200': "SharedFolderList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on shared folder name."), - ] = None, - access: Annotated[ - Optional[SharedFolderAccessLevel], - Field(description="Filter shared folders by access level."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on shared folder name.")] = None, + access: Annotated[Optional[SharedFolderAccessLevel], Field(description="Filter shared folders by access level.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1049,7 +1097,7 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on shared folder name. + :param name: Substring matched search string on shared folder name. :type name: str :param access: Filter shared folders by access level. :type access: SharedFolderAccessLevel @@ -1081,7 +1129,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1099,15 +1147,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolderList", + '200': "SharedFolderList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -1130,79 +1182,90 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if access is not None: - - _query_params.append(("access", access.value)) - + + _query_params.append(('access', access.value)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/shared_folders", + method='GET', + resource_path='/api/shared_folders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1212,9 +1275,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1223,7 +1289,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1258,7 +1327,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_id=shared_folder_id, @@ -1266,19 +1335,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolder", + '200': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1287,7 +1360,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1322,7 +1398,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_id=shared_folder_id, @@ -1330,19 +1406,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolder", + '200': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1351,7 +1431,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1386,7 +1469,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_id=shared_folder_id, @@ -1394,15 +1477,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SharedFolder", + '200': "SharedFolder", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, shared_folder_id, @@ -1415,18 +1502,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_id is not None: - _path_params["shared_folder_id"] = shared_folder_id + _path_params['shared_folder_id'] = shared_folder_id # process the query parameters # process the header parameters # process the form parameters @@ -1434,24 +1524,37 @@ def _update_serialize( if shared_folder_update is not None: _body_params = shared_folder_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/shared_folders/{shared_folder_id}", + method='PATCH', + resource_path='/api/shared_folders/{shared_folder_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1461,5 +1564,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/ssh_private_keys_api.py b/saturn_api/api/ssh_private_keys_api.py index f1de117..31a9a3a 100644 --- a/saturn_api/api/ssh_private_keys_api.py +++ b/saturn_api/api/ssh_private_keys_api.py @@ -1,35 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.ssh_private_key import SSHPrivateKey from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -45,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -52,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_private_key_create=ssh_private_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SSHPrivateKey", + '201': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -112,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -145,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_private_key_create=ssh_private_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SSHPrivateKey", + '201': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -172,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -205,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_private_key_create=ssh_private_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SSHPrivateKey", + '201': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, ssh_private_key_create, @@ -232,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -249,24 +269,37 @@ def _create_serialize( if ssh_private_key_create is not None: _body_params = ssh_private_key_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/ssh_private_keys", + method='POST', + resource_path='/api/ssh_private_keys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -276,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -286,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -346,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -379,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -406,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -439,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, ssh_privatekey_id, @@ -466,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_privatekey_id is not None: - _path_params["ssh_privatekey_id"] = ssh_privatekey_id + _path_params['ssh_privatekey_id'] = ssh_privatekey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/ssh_private_keys/{ssh_privatekey_id}", + method='DELETE', + resource_path='/api/ssh_private_keys/{ssh_privatekey_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -498,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -508,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -541,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKey", + '200': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -568,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKey", + '200': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -628,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -661,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKey", + '200': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, ssh_privatekey_id, @@ -688,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_privatekey_id is not None: - _path_params["ssh_privatekey_id"] = ssh_privatekey_id + _path_params['ssh_privatekey_id'] = ssh_privatekey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/ssh_private_keys/{ssh_privatekey_id}", + method='GET', + resource_path='/api/ssh_private_keys/{ssh_privatekey_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -724,42 +824,31 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on SSH private key name."), - ] = None, - is_default: Annotated[ - Optional[StrictBool], Field(description="Filter SSH private keys by is_default.") - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH private key name.")] = None, + is_default: Annotated[Optional[StrictBool], Field(description="Filter SSH private keys by is_default.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -776,7 +865,7 @@ async def list( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on SSH private key name. + :param name: Substring matched search string on SSH private key name. :type name: str :param is_default: Filter SSH private keys by is_default. :type is_default: bool @@ -808,7 +897,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -823,52 +912,42 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKeyList", + '200': "SSHPrivateKeyList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on SSH private key name."), - ] = None, - is_default: Annotated[ - Optional[StrictBool], Field(description="Filter SSH private keys by is_default.") - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH private key name.")] = None, + is_default: Annotated[Optional[StrictBool], Field(description="Filter SSH private keys by is_default.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -885,7 +964,7 @@ async def list_with_http_info( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on SSH private key name. + :param name: Substring matched search string on SSH private key name. :type name: str :param is_default: Filter SSH private keys by is_default. :type is_default: bool @@ -917,7 +996,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -932,52 +1011,42 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKeyList", + '200': "SSHPrivateKeyList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on SSH private key name."), - ] = None, - is_default: Annotated[ - Optional[StrictBool], Field(description="Filter SSH private keys by is_default.") - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH private key name.")] = None, + is_default: Annotated[Optional[StrictBool], Field(description="Filter SSH private keys by is_default.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -994,7 +1063,7 @@ async def list_without_preload_content( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on SSH private key name. + :param name: Substring matched search string on SSH private key name. :type name: str :param is_default: Filter SSH private keys by is_default. :type is_default: bool @@ -1026,7 +1095,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1041,15 +1110,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKeyList", + '200': "SSHPrivateKeyList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, user_id, @@ -1069,67 +1142,78 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if identity is not None: - - _query_params.append(("identity", identity)) - + + _query_params.append(('identity', identity)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if is_default is not None: - - _query_params.append(("is_default", is_default)) - + + _query_params.append(('is_default', is_default)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/ssh_private_keys", + method='GET', + resource_path='/api/ssh_private_keys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1139,9 +1223,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1150,7 +1237,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1185,7 +1275,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_privatekey_id=ssh_privatekey_id, @@ -1193,19 +1283,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKey", + '200': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1214,7 +1308,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1249,7 +1346,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_privatekey_id=ssh_privatekey_id, @@ -1257,19 +1354,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKey", + '200': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1278,7 +1379,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1313,7 +1417,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_privatekey_id=ssh_privatekey_id, @@ -1321,15 +1425,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPrivateKey", + '200': "SSHPrivateKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, ssh_privatekey_id, @@ -1342,18 +1450,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_privatekey_id is not None: - _path_params["ssh_privatekey_id"] = ssh_privatekey_id + _path_params['ssh_privatekey_id'] = ssh_privatekey_id # process the query parameters # process the header parameters # process the form parameters @@ -1361,24 +1472,37 @@ def _update_serialize( if ssh_private_key_update is not None: _body_params = ssh_private_key_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/ssh_private_keys/{ssh_privatekey_id}", + method='PATCH', + resource_path='/api/ssh_private_keys/{ssh_privatekey_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1388,5 +1512,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/ssh_public_keys_api.py b/saturn_api/api/ssh_public_keys_api.py index 4822442..ef81cf5 100644 --- a/saturn_api/api/ssh_public_keys_api.py +++ b/saturn_api/api/ssh_public_keys_api.py @@ -1,35 +1,30 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.ssh_public_key import SSHPublicKey from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate from saturn_api.models.ssh_public_key_list import SSHPublicKeyList from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -45,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -52,7 +48,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,26 +84,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_public_key_create=ssh_public_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SSHPublicKey", + '201': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -112,7 +115,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -145,26 +151,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_public_key_create=ssh_public_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SSHPublicKey", + '201': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -172,7 +182,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -205,22 +218,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_public_key_create=ssh_public_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SSHPublicKey", + '201': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, ssh_public_key_create, @@ -232,13 +249,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -249,24 +269,37 @@ def _create_serialize( if ssh_public_key_create is not None: _body_params = ssh_public_key_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/ssh_public_keys", + method='POST', + resource_path='/api/ssh_public_keys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -276,9 +309,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -286,7 +322,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,26 +358,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -346,7 +389,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -379,26 +425,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -406,7 +456,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -439,22 +492,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, ssh_publickey_id, @@ -466,29 +523,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_publickey_id is not None: - _path_params["ssh_publickey_id"] = ssh_publickey_id + _path_params['ssh_publickey_id'] = ssh_publickey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/ssh_public_keys/{ssh_publickey_id}", + method='DELETE', + resource_path='/api/ssh_public_keys/{ssh_publickey_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -498,9 +563,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -508,7 +576,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -541,26 +612,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKey", + '200': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -568,7 +643,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,26 +679,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKey", + '200': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -628,7 +710,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -661,22 +746,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKey", + '200': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, ssh_publickey_id, @@ -688,33 +777,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_publickey_id is not None: - _path_params["ssh_publickey_id"] = ssh_publickey_id + _path_params['ssh_publickey_id'] = ssh_publickey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/ssh_public_keys/{ssh_publickey_id}", + method='GET', + resource_path='/api/ssh_public_keys/{ssh_publickey_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -724,39 +824,30 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on SSH public key name."), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH public key name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -773,7 +864,7 @@ async def list( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on SSH public key name. + :param name: Substring matched search string on SSH public key name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -803,7 +894,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -817,49 +908,41 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKeyList", + '200': "SSHPublicKeyList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on SSH public key name."), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH public key name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -876,7 +959,7 @@ async def list_with_http_info( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on SSH public key name. + :param name: Substring matched search string on SSH public key name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -906,7 +989,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -920,49 +1003,41 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKeyList", + '200': "SSHPublicKeyList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - user_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by user ID") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Identity reference by group ID") - ] = None, - identity: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Identity reference by name"), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on SSH public key name."), - ] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, + identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH public key name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -979,7 +1054,7 @@ async def list_without_preload_content( :type group_id: str :param identity: Identity reference by name :type identity: str - :param name: Prefix matched search string on SSH public key name. + :param name: Substring matched search string on SSH public key name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -1009,7 +1084,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1023,15 +1098,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKeyList", + '200': "SSHPublicKeyList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, user_id, @@ -1050,63 +1129,74 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if identity is not None: - - _query_params.append(("identity", identity)) - + + _query_params.append(('identity', identity)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/ssh_public_keys", + method='GET', + resource_path='/api/ssh_public_keys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1116,9 +1206,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1127,7 +1220,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1162,7 +1258,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_publickey_id=ssh_publickey_id, @@ -1170,19 +1266,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKey", + '200': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1191,7 +1291,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1226,7 +1329,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_publickey_id=ssh_publickey_id, @@ -1234,19 +1337,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKey", + '200': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1255,7 +1362,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1290,7 +1400,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_publickey_id=ssh_publickey_id, @@ -1298,15 +1408,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SSHPublicKey", + '200': "SSHPublicKey", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, ssh_publickey_id, @@ -1319,18 +1433,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_publickey_id is not None: - _path_params["ssh_publickey_id"] = ssh_publickey_id + _path_params['ssh_publickey_id'] = ssh_publickey_id # process the query parameters # process the header parameters # process the form parameters @@ -1338,24 +1455,37 @@ def _update_serialize( if ssh_public_key_update is not None: _body_params = ssh_public_key_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/ssh_public_keys/{ssh_publickey_id}", + method='PATCH', + resource_path='/api/ssh_public_keys/{ssh_publickey_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1365,5 +1495,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/users_api.py b/saturn_api/api/users_api.py index 952bf7d..4c7e52f 100644 --- a/saturn_api/api/users_api.py +++ b/saturn_api/api/users_api.py @@ -1,28 +1,31 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.user_admin_create import UserAdminCreate from saturn_api.models.user_detailed import UserDetailed from saturn_api.models.user_update import UserUpdate from saturn_api.models.users_get200_response import UsersGet200Response from saturn_api.models.users_list200_response import UsersList200Response + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -38,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -45,7 +49,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -78,26 +85,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( user_admin_create=user_admin_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "UserDetailed", + '201': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -105,7 +116,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -138,26 +152,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( user_admin_create=user_admin_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "UserDetailed", + '201': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -165,7 +183,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -198,22 +219,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( user_admin_create=user_admin_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "UserDetailed", + '201': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, user_admin_create, @@ -225,13 +250,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -242,24 +270,37 @@ def _create_serialize( if user_admin_create is not None: _body_params = user_admin_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/users", + method='POST', + resource_path='/api/users', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -269,9 +310,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, @@ -279,7 +323,10 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -312,26 +359,30 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, @@ -339,7 +390,10 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -372,26 +426,30 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, @@ -399,7 +457,10 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -432,22 +493,26 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, user_id, @@ -459,29 +524,37 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/users/{user_id}", + method='DELETE', + resource_path='/api/users/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -491,20 +564,24 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, user_id: StrictStr, - details: Annotated[ - Optional[StrictBool], Field(description="Retrive detailed user data.") - ] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrive detailed user data.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -539,7 +616,7 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( user_id=user_id, @@ -547,30 +624,35 @@ async def get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsersGet200Response", + '200': "UsersGet200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, user_id: StrictStr, - details: Annotated[ - Optional[StrictBool], Field(description="Retrive detailed user data.") - ] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrive detailed user data.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -605,7 +687,7 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( user_id=user_id, @@ -613,30 +695,35 @@ async def get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsersGet200Response", + '200': "UsersGet200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, user_id: StrictStr, - details: Annotated[ - Optional[StrictBool], Field(description="Retrive detailed user data.") - ] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrive detailed user data.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -671,7 +758,7 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( user_id=user_id, @@ -679,15 +766,19 @@ async def get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsersGet200Response", + '200': "UsersGet200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, user_id, @@ -700,37 +791,48 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters if details is not None: - - _query_params.append(("details", details)) - + + _query_params.append(('details', details)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/users/{user_id}", + method='GET', + resource_path='/api/users/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -740,34 +842,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - username: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on user name.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on user email.") - ] = None, - details: Annotated[ - Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)") - ] = None, + username: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user name.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user email.")] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -778,9 +875,9 @@ async def list( Paginated list of users. - :param username: Prefix matched search string on user name. + :param username: Substring matched search string on user name. :type username: str - :param email: Prefix matched search string on user email. + :param email: Substring matched search string on user email. :type email: str :param details: Retrieve detailed user data. (Admin only) :type details: bool @@ -812,7 +909,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( username=username, @@ -825,44 +922,40 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsersList200Response", + '200': "UsersList200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - username: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on user name.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on user email.") - ] = None, - details: Annotated[ - Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)") - ] = None, + username: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user name.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user email.")] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -873,9 +966,9 @@ async def list_with_http_info( Paginated list of users. - :param username: Prefix matched search string on user name. + :param username: Substring matched search string on user name. :type username: str - :param email: Prefix matched search string on user email. + :param email: Substring matched search string on user email. :type email: str :param details: Retrieve detailed user data. (Admin only) :type details: bool @@ -907,7 +1000,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( username=username, @@ -920,44 +1013,40 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsersList200Response", + '200': "UsersList200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - username: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on user name.") - ] = None, - email: Annotated[ - Optional[StrictStr], Field(description="Prefix matched search string on user email.") - ] = None, - details: Annotated[ - Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)") - ] = None, + username: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user name.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user email.")] = None, + details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -968,9 +1057,9 @@ async def list_without_preload_content( Paginated list of users. - :param username: Prefix matched search string on user name. + :param username: Substring matched search string on user name. :type username: str - :param email: Prefix matched search string on user email. + :param email: Substring matched search string on user email. :type email: str :param details: Retrieve detailed user data. (Admin only) :type details: bool @@ -1002,7 +1091,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( username=username, @@ -1015,15 +1104,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UsersList200Response", + '200': "UsersList200Response", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, username, @@ -1041,59 +1134,70 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if username is not None: - - _query_params.append(("username", username)) - + + _query_params.append(('username', username)) + if email is not None: - - _query_params.append(("email", email)) - + + _query_params.append(('email', email)) + if details is not None: - - _query_params.append(("details", details)) - + + _query_params.append(('details', details)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/users", + method='GET', + resource_path='/api/users', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1103,9 +1207,12 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -1114,7 +1221,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1149,7 +1259,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_id=user_id, @@ -1157,19 +1267,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", + '200': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -1178,7 +1292,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1213,7 +1330,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_id=user_id, @@ -1221,19 +1338,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", + '200': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -1242,7 +1363,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1277,7 +1401,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_id=user_id, @@ -1285,15 +1409,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserDetailed", + '200': "UserDetailed", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, user_id, @@ -1306,18 +1434,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params["user_id"] = user_id + _path_params['user_id'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -1325,24 +1456,37 @@ def _update_serialize( if user_update is not None: _body_params = user_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/users/{user_id}", + method='PATCH', + resource_path='/api/users/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1352,5 +1496,7 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api/workspaces_api.py b/saturn_api/api/workspaces_api.py index 253ff7d..37c9e24 100644 --- a/saturn_api/api/workspaces_api.py +++ b/saturn_api/api/workspaces_api.py @@ -1,32 +1,24 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import ( - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, - field_validator, - validate_call, -) +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.metrics import Metrics from saturn_api.models.resource_clusters import ResourceClusters @@ -44,9 +36,7 @@ from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate from saturn_api.models.service_account_attachment import ServiceAccountAttachment -from saturn_api.models.service_account_create_attachment import ( - ServiceAccountCreateAttachment, -) +from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment from saturn_api.models.viewer import Viewer from saturn_api.models.viewer_create import ViewerCreate from saturn_api.models.viewer_list import ViewerList @@ -58,6 +48,9 @@ from saturn_api.models.workspace_server_info import WorkspaceServerInfo from saturn_api.models.workspace_start import WorkspaceStart from saturn_api.models.workspace_update import WorkspaceUpdate + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -73,6 +66,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create( self, @@ -80,7 +74,10 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -113,26 +110,30 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( workspace_create=workspace_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Workspace", + '201': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_with_http_info( self, @@ -140,7 +141,10 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -173,26 +177,30 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( workspace_create=workspace_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Workspace", + '201': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_without_preload_content( self, @@ -200,7 +208,10 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -233,22 +244,26 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( workspace_create=workspace_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Workspace", + '201': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_serialize( self, workspace_create, @@ -260,13 +275,16 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -277,24 +295,37 @@ def _create_serialize( if workspace_create is not None: _body_params = workspace_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces", + method='POST', + resource_path='/api/workspaces', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -304,9 +335,12 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_resource_template( self, @@ -314,7 +348,10 @@ async def create_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -346,26 +383,30 @@ async def create_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_resource_template_with_http_info( self, @@ -373,7 +414,10 @@ async def create_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -405,26 +449,30 @@ async def create_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_resource_template_without_preload_content( self, @@ -432,7 +480,10 @@ async def create_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -464,22 +515,26 @@ async def create_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ResourceTemplate", + '201': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_resource_template_serialize( self, workspace_id, @@ -491,33 +546,44 @@ def _create_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/template", + method='POST', + resource_path='/api/workspaces/{workspace_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -527,9 +593,12 @@ def _create_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_route( self, @@ -538,7 +607,10 @@ async def create_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -573,7 +645,7 @@ async def create_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( workspace_id=workspace_id, @@ -581,19 +653,23 @@ async def create_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Route", + '201': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_route_with_http_info( self, @@ -602,7 +678,10 @@ async def create_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -637,7 +716,7 @@ async def create_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( workspace_id=workspace_id, @@ -645,19 +724,23 @@ async def create_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Route", + '201': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_route_without_preload_content( self, @@ -666,7 +749,10 @@ async def create_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -701,7 +787,7 @@ async def create_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( workspace_id=workspace_id, @@ -709,15 +795,19 @@ async def create_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Route", + '201': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_route_serialize( self, workspace_id, @@ -730,18 +820,21 @@ def _create_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -749,24 +842,37 @@ def _create_route_serialize( if route_create is not None: _body_params = route_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/routes", + method='POST', + resource_path='/api/workspaces/{workspace_id}/routes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -776,9 +882,12 @@ def _create_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_secret_attachment( self, @@ -787,7 +896,10 @@ async def create_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -821,7 +933,7 @@ async def create_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( workspace_id=workspace_id, @@ -829,19 +941,23 @@ async def create_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_secret_attachment_with_http_info( self, @@ -850,7 +966,10 @@ async def create_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -884,7 +1003,7 @@ async def create_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( workspace_id=workspace_id, @@ -892,19 +1011,23 @@ async def create_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_secret_attachment_without_preload_content( self, @@ -913,7 +1036,10 @@ async def create_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -947,7 +1073,7 @@ async def create_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( workspace_id=workspace_id, @@ -955,15 +1081,19 @@ async def create_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecretAttachment", + '201': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_secret_attachment_serialize( self, workspace_id, @@ -976,18 +1106,21 @@ def _create_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -995,24 +1128,37 @@ def _create_secret_attachment_serialize( if secret_attachment_create is not None: _body_params = secret_attachment_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/secrets", + method='POST', + resource_path='/api/workspaces/{workspace_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1022,9 +1168,12 @@ def _create_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_service_account_attachment( self, @@ -1033,7 +1182,10 @@ async def create_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1067,7 +1219,7 @@ async def create_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( workspace_id=workspace_id, @@ -1075,19 +1227,23 @@ async def create_service_account_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_service_account_attachment_with_http_info( self, @@ -1096,7 +1252,10 @@ async def create_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1130,7 +1289,7 @@ async def create_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( workspace_id=workspace_id, @@ -1138,19 +1297,23 @@ async def create_service_account_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_service_account_attachment_without_preload_content( self, @@ -1159,7 +1322,10 @@ async def create_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1193,7 +1359,7 @@ async def create_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( workspace_id=workspace_id, @@ -1201,15 +1367,19 @@ async def create_service_account_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountAttachment", + '201': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_service_account_attachment_serialize( self, workspace_id, @@ -1222,18 +1392,21 @@ def _create_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -1241,24 +1414,37 @@ def _create_service_account_attachment_serialize( if service_account_create_attachment is not None: _body_params = service_account_create_attachment + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/api/workspaces/{workspace_id}/service_account", + method='PUT', + resource_path='/api/workspaces/{workspace_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1268,9 +1454,12 @@ def _create_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_viewer( self, @@ -1279,7 +1468,10 @@ async def create_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1314,7 +1506,7 @@ async def create_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( workspace_id=workspace_id, @@ -1322,19 +1514,23 @@ async def create_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Viewer", + '201': "Viewer", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def create_viewer_with_http_info( self, @@ -1343,7 +1539,10 @@ async def create_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1378,7 +1577,7 @@ async def create_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( workspace_id=workspace_id, @@ -1386,19 +1585,23 @@ async def create_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Viewer", + '201': "Viewer", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def create_viewer_without_preload_content( self, @@ -1407,7 +1610,10 @@ async def create_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1442,7 +1648,7 @@ async def create_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( workspace_id=workspace_id, @@ -1450,15 +1656,19 @@ async def create_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Viewer", + '201': "Viewer", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _create_viewer_serialize( self, workspace_id, @@ -1471,18 +1681,21 @@ def _create_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -1490,24 +1703,37 @@ def _create_viewer_serialize( if viewer_create is not None: _body_params = viewer_create + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/viewers", + method='POST', + resource_path='/api/workspaces/{workspace_id}/viewers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1517,21 +1743,24 @@ def _create_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete( self, workspace_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete workspace that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete workspace that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1566,7 +1795,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( workspace_id=workspace_id, @@ -1574,31 +1803,35 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_with_http_info( self, workspace_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete workspace that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete workspace that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1633,7 +1866,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( workspace_id=workspace_id, @@ -1641,31 +1874,35 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_without_preload_content( self, workspace_id: StrictStr, - allow_active: Annotated[ - Optional[StrictBool], - Field(description="Force delete workspace that is currently active."), - ] = None, + allow_active: Annotated[Optional[StrictBool], Field(description="Force delete workspace that is currently active.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1700,7 +1937,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( workspace_id=workspace_id, @@ -1708,15 +1945,19 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_serialize( self, workspace_id, @@ -1729,33 +1970,41 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if allow_active is not None: - - _query_params.append(("allow_active", allow_active)) - + + _query_params.append(('allow_active', allow_active)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/workspaces/{workspace_id}", + method='DELETE', + resource_path='/api/workspaces/{workspace_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1765,9 +2014,12 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_route( self, @@ -1776,7 +2028,10 @@ async def delete_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1811,7 +2066,7 @@ async def delete_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( workspace_id=workspace_id, @@ -1819,19 +2074,23 @@ async def delete_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_route_with_http_info( self, @@ -1840,7 +2099,10 @@ async def delete_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1875,7 +2137,7 @@ async def delete_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( workspace_id=workspace_id, @@ -1883,19 +2145,23 @@ async def delete_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_route_without_preload_content( self, @@ -1904,7 +2170,10 @@ async def delete_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1939,7 +2208,7 @@ async def delete_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( workspace_id=workspace_id, @@ -1947,15 +2216,19 @@ async def delete_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_route_serialize( self, workspace_id, @@ -1968,31 +2241,39 @@ def _delete_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if route_id is not None: - _path_params["route_id"] = route_id + _path_params['route_id'] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/workspaces/{workspace_id}/routes/{route_id}", + method='DELETE', + resource_path='/api/workspaces/{workspace_id}/routes/{route_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2002,9 +2283,12 @@ def _delete_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_secret_attachment( self, @@ -2013,7 +2297,10 @@ async def delete_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2047,7 +2334,7 @@ async def delete_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( workspace_id=workspace_id, @@ -2055,19 +2342,23 @@ async def delete_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_secret_attachment_with_http_info( self, @@ -2076,7 +2367,10 @@ async def delete_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2110,7 +2404,7 @@ async def delete_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( workspace_id=workspace_id, @@ -2118,19 +2412,23 @@ async def delete_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_secret_attachment_without_preload_content( self, @@ -2139,7 +2437,10 @@ async def delete_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2173,7 +2474,7 @@ async def delete_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( workspace_id=workspace_id, @@ -2181,15 +2482,19 @@ async def delete_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_secret_attachment_serialize( self, workspace_id, @@ -2202,31 +2507,39 @@ def _delete_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}", + method='DELETE', + resource_path='/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2236,9 +2549,12 @@ def _delete_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_service_account_attachment( self, @@ -2246,7 +2562,10 @@ async def delete_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2278,26 +2597,30 @@ async def delete_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_service_account_attachment_with_http_info( self, @@ -2305,7 +2628,10 @@ async def delete_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2337,26 +2663,30 @@ async def delete_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_service_account_attachment_without_preload_content( self, @@ -2364,7 +2694,10 @@ async def delete_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2396,22 +2729,26 @@ async def delete_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_service_account_attachment_serialize( self, workspace_id, @@ -2423,29 +2760,37 @@ def _delete_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/workspaces/{workspace_id}/service_account", + method='DELETE', + resource_path='/api/workspaces/{workspace_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2455,9 +2800,12 @@ def _delete_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_viewer( self, @@ -2466,7 +2814,10 @@ async def delete_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2501,7 +2852,7 @@ async def delete_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( workspace_id=workspace_id, @@ -2509,19 +2860,23 @@ async def delete_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def delete_viewer_with_http_info( self, @@ -2530,7 +2885,10 @@ async def delete_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2565,7 +2923,7 @@ async def delete_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( workspace_id=workspace_id, @@ -2573,19 +2931,23 @@ async def delete_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def delete_viewer_without_preload_content( self, @@ -2594,7 +2956,10 @@ async def delete_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2629,7 +2994,7 @@ async def delete_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( workspace_id=workspace_id, @@ -2637,15 +3002,19 @@ async def delete_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + '204': None, } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _delete_viewer_serialize( self, workspace_id, @@ -2658,31 +3027,39 @@ def _delete_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if viewer_id is not None: - _path_params["viewer_id"] = viewer_id + _path_params['viewer_id'] = viewer_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/api/workspaces/{workspace_id}/viewers/{viewer_id}", + method='DELETE', + resource_path='/api/workspaces/{workspace_id}/viewers/{viewer_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2692,9 +3069,12 @@ def _delete_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get( self, @@ -2702,7 +3082,10 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2735,26 +3118,30 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_with_http_info( self, @@ -2762,7 +3149,10 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2795,26 +3185,30 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_without_preload_content( self, @@ -2822,7 +3216,10 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2855,22 +3252,26 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_serialize( self, workspace_id, @@ -2882,33 +3283,44 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}", + method='GET', + resource_path='/api/workspaces/{workspace_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2918,9 +3330,12 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_cluster_history( self, @@ -2928,7 +3343,10 @@ async def get_cluster_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2961,26 +3379,30 @@ async def get_cluster_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_cluster_history_with_http_info( self, @@ -2988,7 +3410,10 @@ async def get_cluster_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3021,26 +3446,30 @@ async def get_cluster_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_cluster_history_without_preload_content( self, @@ -3048,7 +3477,10 @@ async def get_cluster_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3081,22 +3513,26 @@ async def get_cluster_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceClusters", + '200': "ResourceClusters", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_cluster_history_serialize( self, workspace_id, @@ -3108,33 +3544,44 @@ def _get_cluster_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/clusters", + method='GET', + resource_path='/api/workspaces/{workspace_id}/clusters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3144,29 +3591,28 @@ def _get_cluster_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_logs( self, workspace_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3209,7 +3655,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( workspace_id=workspace_id, @@ -3221,39 +3667,39 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_logs_with_http_info( self, workspace_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3296,7 +3742,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( workspace_id=workspace_id, @@ -3308,39 +3754,39 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_logs_without_preload_content( self, workspace_id: StrictStr, - pod_name: Annotated[ - Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") - ] = None, + pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Maximum number of results per page."), - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3383,7 +3829,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( workspace_id=workspace_id, @@ -3395,15 +3841,19 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HistoricLogList", + '200': "HistoricLogList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_logs_serialize( self, workspace_id, @@ -3420,53 +3870,64 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if pod_name is not None: - - _query_params.append(("pod_name", pod_name)) - + + _query_params.append(('pod_name', pod_name)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/logs", + method='GET', + resource_path='/api/workspaces/{workspace_id}/logs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3476,32 +3937,28 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_metrics( self, workspace_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3544,7 +4001,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( workspace_id=workspace_id, @@ -3556,42 +4013,39 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_metrics_with_http_info( self, workspace_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3634,7 +4088,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( workspace_id=workspace_id, @@ -3646,42 +4100,39 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_metrics_without_preload_content( self, workspace_id: StrictStr, - type: Annotated[ - Optional[StrictStr], Field(description="Filter metric series by type.") - ] = None, - start: Annotated[ - Optional[datetime], Field(description="Start timestamp of the metrics query.") - ] = None, - end: Annotated[ - Optional[datetime], Field(description="End timestamp of the metrics query.") - ] = None, - resolution: Annotated[ - Optional[StrictStr], Field(description="Sampling resolution of metrics points.") - ] = None, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, + start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, + end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, + resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3724,7 +4175,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( workspace_id=workspace_id, @@ -3736,15 +4187,19 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Metrics", + '200': "Metrics", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_metrics_serialize( self, workspace_id, @@ -3761,61 +4216,82 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if type is not None: - - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ("start", start.strftime(self.api_client.configuration.datetime_format)) + ( + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if resolution is not None: - - _query_params.append(("resolution", resolution)) - + + _query_params.append(('resolution', resolution)) + if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/metrics", + method='GET', + resource_path='/api/workspaces/{workspace_id}/metrics', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3825,20 +4301,24 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_pod_history( self, workspace_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3873,7 +4353,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( workspace_id=workspace_id, @@ -3881,30 +4361,35 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_pod_history_with_http_info( self, workspace_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3939,7 +4424,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( workspace_id=workspace_id, @@ -3947,30 +4432,35 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_pod_history_without_preload_content( self, workspace_id: StrictStr, - cluster: Annotated[ - Optional[StrictStr], Field(description="Cluster to query for metrics.") - ] = None, + cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4005,7 +4495,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( workspace_id=workspace_id, @@ -4013,15 +4503,19 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceHistory", + '200': "ResourceHistory", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_pod_history_serialize( self, workspace_id, @@ -4034,37 +4528,48 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if cluster is not None: - - _query_params.append(("cluster", cluster)) - + + _query_params.append(('cluster', cluster)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/history", + method='GET', + resource_path='/api/workspaces/{workspace_id}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4074,9 +4579,12 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_recipe( self, @@ -4085,7 +4593,10 @@ async def get_recipe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4119,7 +4630,7 @@ async def get_recipe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( workspace_id=workspace_id, @@ -4127,19 +4638,23 @@ async def get_recipe( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceRecipe", + '200': "WorkspaceRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_recipe_with_http_info( self, @@ -4148,7 +4663,10 @@ async def get_recipe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4182,7 +4700,7 @@ async def get_recipe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( workspace_id=workspace_id, @@ -4190,19 +4708,23 @@ async def get_recipe_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceRecipe", + '200': "WorkspaceRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_recipe_without_preload_content( self, @@ -4211,7 +4733,10 @@ async def get_recipe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4245,7 +4770,7 @@ async def get_recipe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( workspace_id=workspace_id, @@ -4253,15 +4778,19 @@ async def get_recipe_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceRecipe", + '200': "WorkspaceRecipe", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_recipe_serialize( self, workspace_id, @@ -4274,37 +4803,48 @@ def _get_recipe_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if as_template is not None: - - _query_params.append(("as_template", as_template)) - + + _query_params.append(('as_template', as_template)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/recipe", + method='GET', + resource_path='/api/workspaces/{workspace_id}/recipe', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4314,9 +4854,12 @@ def _get_recipe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_resource_template( self, @@ -4324,7 +4867,10 @@ async def get_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4356,26 +4902,30 @@ async def get_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_resource_template_with_http_info( self, @@ -4383,7 +4933,10 @@ async def get_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4415,26 +4968,30 @@ async def get_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_resource_template_without_preload_content( self, @@ -4442,7 +4999,10 @@ async def get_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4474,22 +5034,26 @@ async def get_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_resource_template_serialize( self, workspace_id, @@ -4501,33 +5065,44 @@ def _get_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/template", + method='GET', + resource_path='/api/workspaces/{workspace_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4537,9 +5112,12 @@ def _get_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_route( self, @@ -4548,7 +5126,10 @@ async def get_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4583,7 +5164,7 @@ async def get_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( workspace_id=workspace_id, @@ -4591,19 +5172,23 @@ async def get_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_route_with_http_info( self, @@ -4612,7 +5197,10 @@ async def get_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4647,7 +5235,7 @@ async def get_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( workspace_id=workspace_id, @@ -4655,19 +5243,23 @@ async def get_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_route_without_preload_content( self, @@ -4676,7 +5268,10 @@ async def get_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4711,7 +5306,7 @@ async def get_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( workspace_id=workspace_id, @@ -4719,15 +5314,19 @@ async def get_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_route_serialize( self, workspace_id, @@ -4740,35 +5339,46 @@ def _get_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if route_id is not None: - _path_params["route_id"] = route_id + _path_params['route_id'] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/routes/{route_id}", + method='GET', + resource_path='/api/workspaces/{workspace_id}/routes/{route_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4778,9 +5388,12 @@ def _get_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_runtime_summary( self, @@ -4788,7 +5401,10 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4821,26 +5437,30 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceRuntimeSummary", + '200': "WorkspaceRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_runtime_summary_with_http_info( self, @@ -4848,7 +5468,10 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4881,26 +5504,30 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceRuntimeSummary", + '200': "WorkspaceRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_runtime_summary_without_preload_content( self, @@ -4908,7 +5535,10 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4941,22 +5571,26 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceRuntimeSummary", + '200': "WorkspaceRuntimeSummary", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_runtime_summary_serialize( self, workspace_id, @@ -4968,33 +5602,44 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/runtimesummary", + method='GET', + resource_path='/api/workspaces/{workspace_id}/runtimesummary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5004,9 +5649,12 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_secret_attachment( self, @@ -5015,7 +5663,10 @@ async def get_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5049,7 +5700,7 @@ async def get_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( workspace_id=workspace_id, @@ -5057,19 +5708,23 @@ async def get_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_secret_attachment_with_http_info( self, @@ -5078,7 +5733,10 @@ async def get_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5112,7 +5770,7 @@ async def get_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( workspace_id=workspace_id, @@ -5120,19 +5778,23 @@ async def get_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_secret_attachment_without_preload_content( self, @@ -5141,7 +5803,10 @@ async def get_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5175,7 +5840,7 @@ async def get_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( workspace_id=workspace_id, @@ -5183,15 +5848,19 @@ async def get_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_secret_attachment_serialize( self, workspace_id, @@ -5204,35 +5873,46 @@ def _get_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}", + method='GET', + resource_path='/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5242,16 +5922,22 @@ def _get_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5281,32 +5967,39 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceServerInfo", + '200': "WorkspaceServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5336,32 +6029,39 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceServerInfo", + '200': "WorkspaceServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5391,21 +6091,25 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceServerInfo", + '200': "WorkspaceServerInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_server_options_serialize( self, _request_auth, @@ -5416,13 +6120,16 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5431,16 +6138,24 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/info", + method='GET', + resource_path='/api/workspaces/info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5450,9 +6165,12 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_service_account_attachment( self, @@ -5460,7 +6178,10 @@ async def get_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5492,26 +6213,30 @@ async def get_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_service_account_attachment_with_http_info( self, @@ -5519,7 +6244,10 @@ async def get_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5551,26 +6279,30 @@ async def get_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_service_account_attachment_without_preload_content( self, @@ -5578,7 +6310,10 @@ async def get_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5610,22 +6345,26 @@ async def get_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountAttachment", + '200': "ServiceAccountAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_service_account_attachment_serialize( self, workspace_id, @@ -5637,33 +6376,44 @@ def _get_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/service_account", + method='GET', + resource_path='/api/workspaces/{workspace_id}/service_account', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5673,9 +6423,12 @@ def _get_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_token_info( self, @@ -5683,7 +6436,10 @@ async def get_token_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5715,26 +6471,30 @@ async def get_token_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def get_token_info_with_http_info( self, @@ -5742,7 +6502,10 @@ async def get_token_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5774,26 +6537,30 @@ async def get_token_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def get_token_info_without_preload_content( self, @@ -5801,7 +6568,10 @@ async def get_token_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5833,22 +6603,26 @@ async def get_token_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _get_token_info_serialize( self, workspace_id, @@ -5860,33 +6634,44 @@ def _get_token_info_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/token", + method='GET', + resource_path='/api/workspaces/{workspace_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5896,48 +6681,33 @@ def _get_token_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on workspace name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on workspace name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5960,7 +6730,7 @@ async def list( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on workspace name. + :param name: Substring matched search string on workspace name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -5990,7 +6760,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6007,58 +6777,44 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceList", + '200': "WorkspaceList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_with_http_info( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on workspace name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on workspace name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6081,7 +6837,7 @@ async def list_with_http_info( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on workspace name. + :param name: Substring matched search string on workspace name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -6111,7 +6867,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6128,58 +6884,44 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceList", + '200': "WorkspaceList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_without_preload_content( self, - owner_name: Annotated[ - Optional[StrictStr], Field(description="Reference owner by name.") - ] = None, - owner_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by ID.") - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by user ID.") - ] = None, - group_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by group ID.") - ] = None, - org_id: Annotated[ - Optional[StrictStr], Field(description="Reference owner by org ID.") - ] = None, - owner: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field(description="Reference owner by name."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on workspace name."), - ] = None, + owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, + owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, + group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, + org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, + owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on workspace name.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6202,7 +6944,7 @@ async def list_without_preload_content( :type org_id: str :param owner: Reference owner by name. :type owner: str - :param name: Prefix matched search string on workspace name. + :param name: Substring matched search string on workspace name. :type name: str :param prev_key: Previous page key. :type prev_key: str @@ -6232,7 +6974,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6249,15 +6991,19 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WorkspaceList", + '200': "WorkspaceList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_serialize( self, owner_name, @@ -6279,75 +7025,86 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(("owner_name", owner_name)) - + + _query_params.append(('owner_name', owner_name)) + if owner_id is not None: - - _query_params.append(("owner_id", owner_id)) - + + _query_params.append(('owner_id', owner_id)) + if user_id is not None: - - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if group_id is not None: - - _query_params.append(("group_id", group_id)) - + + _query_params.append(('group_id', group_id)) + if org_id is not None: - - _query_params.append(("org_id", org_id)) - + + _query_params.append(('org_id', org_id)) + if owner is not None: - - _query_params.append(("owner", owner)) - + + _query_params.append(('owner', owner)) + if name is not None: - - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces", + method='GET', + resource_path='/api/workspaces', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6357,30 +7114,28 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_routes( self, workspace_id: StrictStr, - subdomain: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on route subdomain."), - ] = None, + subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6393,7 +7148,7 @@ async def list_routes( :param workspace_id: (required) :type workspace_id: str - :param subdomain: Prefix matched search string on route subdomain. + :param subdomain: Substring matched search string on route subdomain. :type subdomain: str :param prev_key: Previous page key. :type prev_key: str @@ -6423,7 +7178,7 @@ async def list_routes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( workspace_id=workspace_id, @@ -6435,40 +7190,39 @@ async def list_routes( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteList", + '200': "RouteList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_routes_with_http_info( self, workspace_id: StrictStr, - subdomain: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on route subdomain."), - ] = None, + subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6481,7 +7235,7 @@ async def list_routes_with_http_info( :param workspace_id: (required) :type workspace_id: str - :param subdomain: Prefix matched search string on route subdomain. + :param subdomain: Substring matched search string on route subdomain. :type subdomain: str :param prev_key: Previous page key. :type prev_key: str @@ -6511,7 +7265,7 @@ async def list_routes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( workspace_id=workspace_id, @@ -6523,40 +7277,39 @@ async def list_routes_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteList", + '200': "RouteList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_routes_without_preload_content( self, workspace_id: StrictStr, - subdomain: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on route subdomain."), - ] = None, + subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6569,7 +7322,7 @@ async def list_routes_without_preload_content( :param workspace_id: (required) :type workspace_id: str - :param subdomain: Prefix matched search string on route subdomain. + :param subdomain: Substring matched search string on route subdomain. :type subdomain: str :param prev_key: Previous page key. :type prev_key: str @@ -6599,7 +7352,7 @@ async def list_routes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( workspace_id=workspace_id, @@ -6611,15 +7364,19 @@ async def list_routes_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteList", + '200': "RouteList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_routes_serialize( self, workspace_id, @@ -6636,53 +7393,64 @@ def _list_routes_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if subdomain is not None: - - _query_params.append(("subdomain", subdomain)) - + + _query_params.append(('subdomain', subdomain)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/routes", + method='GET', + resource_path='/api/workspaces/{workspace_id}/routes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6692,33 +7460,29 @@ def _list_routes_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_secret_attachments( self, workspace_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6730,7 +7494,7 @@ async def list_secret_attachments( :param workspace_id: (required) :type workspace_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -6762,7 +7526,7 @@ async def list_secret_attachments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( workspace_id=workspace_id, @@ -6775,43 +7539,40 @@ async def list_secret_attachments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_secret_attachments_with_http_info( self, workspace_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6823,7 +7584,7 @@ async def list_secret_attachments_with_http_info( :param workspace_id: (required) :type workspace_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -6855,7 +7616,7 @@ async def list_secret_attachments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( workspace_id=workspace_id, @@ -6868,43 +7629,40 @@ async def list_secret_attachments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_secret_attachments_without_preload_content( self, workspace_id: StrictStr, - location: Annotated[ - Optional[StrictStr], - Field(description="Prefix matched search string on secret attachment location."), - ] = None, - attachment_type: Annotated[ - Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") - ] = None, + location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, + attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6916,7 +7674,7 @@ async def list_secret_attachments_without_preload_content( :param workspace_id: (required) :type workspace_id: str - :param location: Prefix matched search string on secret attachment location. + :param location: Substring matched search string on secret attachment location. :type location: str :param attachment_type: Filter secret attachments by type. :type attachment_type: SecretAttachmentType @@ -6948,7 +7706,7 @@ async def list_secret_attachments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( workspace_id=workspace_id, @@ -6961,15 +7719,19 @@ async def list_secret_attachments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachmentList", + '200': "SecretAttachmentList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_secret_attachments_serialize( self, workspace_id, @@ -6987,57 +7749,68 @@ def _list_secret_attachments_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if location is not None: - - _query_params.append(("location", location)) - + + _query_params.append(('location', location)) + if attachment_type is not None: - - _query_params.append(("attachment_type", attachment_type.value)) - + + _query_params.append(('attachment_type', attachment_type.value)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/secrets", + method='GET', + resource_path='/api/workspaces/{workspace_id}/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7047,29 +7820,28 @@ def _list_secret_attachments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_viewers( self, workspace_id: StrictStr, - route_id: Annotated[ - Optional[StrictStr], Field(description="Filter viewers by route ID.") - ] = None, + route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7112,7 +7884,7 @@ async def list_viewers( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( workspace_id=workspace_id, @@ -7124,39 +7896,39 @@ async def list_viewers( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ViewerList", + '200': "ViewerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def list_viewers_with_http_info( self, workspace_id: StrictStr, - route_id: Annotated[ - Optional[StrictStr], Field(description="Filter viewers by route ID.") - ] = None, + route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7199,7 +7971,7 @@ async def list_viewers_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( workspace_id=workspace_id, @@ -7211,39 +7983,39 @@ async def list_viewers_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ViewerList", + '200': "ViewerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def list_viewers_without_preload_content( self, workspace_id: StrictStr, - route_id: Annotated[ - Optional[StrictStr], Field(description="Filter viewers by route ID.") - ] = None, + route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[ - Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], - Field(description="Page size."), - ] = None, - descending: Annotated[ - Optional[StrictBool], Field(description="List results in descending order.") - ] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7286,7 +8058,7 @@ async def list_viewers_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( workspace_id=workspace_id, @@ -7298,15 +8070,19 @@ async def list_viewers_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ViewerList", + '200': "ViewerList", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _list_viewers_serialize( self, workspace_id, @@ -7323,53 +8099,64 @@ def _list_viewers_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters if route_id is not None: - - _query_params.append(("route_id", route_id)) - + + _query_params.append(('route_id', route_id)) + if prev_key is not None: - - _query_params.append(("prev_key", prev_key)) - + + _query_params.append(('prev_key', prev_key)) + if next_key is not None: - - _query_params.append(("next_key", next_key)) - + + _query_params.append(('next_key', next_key)) + if page_size is not None: - - _query_params.append(("page_size", page_size)) - + + _query_params.append(('page_size', page_size)) + if descending is not None: - - _query_params.append(("descending", descending)) - + + _query_params.append(('descending', descending)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/api/workspaces/{workspace_id}/viewers", + method='GET', + resource_path='/api/workspaces/{workspace_id}/viewers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7379,9 +8166,12 @@ def _list_viewers_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def restart( self, @@ -7390,7 +8180,10 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7425,7 +8218,7 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( workspace_id=workspace_id, @@ -7433,19 +8226,23 @@ async def restart( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def restart_with_http_info( self, @@ -7454,7 +8251,10 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7489,7 +8289,7 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( workspace_id=workspace_id, @@ -7497,19 +8297,23 @@ async def restart_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def restart_without_preload_content( self, @@ -7518,7 +8322,10 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7553,7 +8360,7 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( workspace_id=workspace_id, @@ -7561,15 +8368,19 @@ async def restart_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _restart_serialize( self, workspace_id, @@ -7582,18 +8393,21 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -7601,24 +8415,37 @@ def _restart_serialize( if workspace_start is not None: _body_params = workspace_start + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/restart", + method='POST', + resource_path='/api/workspaces/{workspace_id}/restart', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7628,9 +8455,12 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def rotate_token( self, @@ -7638,7 +8468,10 @@ async def rotate_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7671,26 +8504,30 @@ async def rotate_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def rotate_token_with_http_info( self, @@ -7698,7 +8535,10 @@ async def rotate_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7731,26 +8571,30 @@ async def rotate_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def rotate_token_without_preload_content( self, @@ -7758,7 +8602,10 @@ async def rotate_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7791,22 +8638,26 @@ async def rotate_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _rotate_token_serialize( self, workspace_id, @@ -7818,33 +8669,44 @@ def _rotate_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/token", + method='POST', + resource_path='/api/workspaces/{workspace_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7854,9 +8716,12 @@ def _rotate_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def start( self, @@ -7865,7 +8730,10 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7900,7 +8768,7 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( workspace_id=workspace_id, @@ -7908,19 +8776,23 @@ async def start( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def start_with_http_info( self, @@ -7929,7 +8801,10 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7964,7 +8839,7 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( workspace_id=workspace_id, @@ -7972,19 +8847,23 @@ async def start_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def start_without_preload_content( self, @@ -7993,7 +8872,10 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8028,7 +8910,7 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( workspace_id=workspace_id, @@ -8036,15 +8918,19 @@ async def start_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _start_serialize( self, workspace_id, @@ -8057,18 +8943,21 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -8076,24 +8965,37 @@ def _start_serialize( if workspace_start is not None: _body_params = workspace_start + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/start", + method='POST', + resource_path='/api/workspaces/{workspace_id}/start', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8103,9 +9005,12 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def stop( self, @@ -8113,7 +9018,10 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8146,26 +9054,30 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def stop_with_http_info( self, @@ -8173,7 +9085,10 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8206,26 +9121,30 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def stop_without_preload_content( self, @@ -8233,7 +9152,10 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8266,22 +9188,26 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _stop_serialize( self, workspace_id, @@ -8293,33 +9219,44 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/api/workspaces/{workspace_id}/stop", + method='POST', + resource_path='/api/workspaces/{workspace_id}/stop', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8329,9 +9266,12 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update( self, @@ -8340,7 +9280,10 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8375,7 +9318,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( workspace_id=workspace_id, @@ -8383,19 +9326,23 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_with_http_info( self, @@ -8404,7 +9351,10 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8439,7 +9389,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( workspace_id=workspace_id, @@ -8447,19 +9397,23 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_without_preload_content( self, @@ -8468,7 +9422,10 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8503,7 +9460,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( workspace_id=workspace_id, @@ -8511,15 +9468,19 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Workspace", + '200': "Workspace", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_serialize( self, workspace_id, @@ -8532,18 +9493,21 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -8551,24 +9515,37 @@ def _update_serialize( if workspace_update is not None: _body_params = workspace_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/workspaces/{workspace_id}", + method='PATCH', + resource_path='/api/workspaces/{workspace_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8578,9 +9555,12 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_resource_template( self, @@ -8588,7 +9568,10 @@ async def update_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8620,26 +9603,30 @@ async def update_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_resource_template_with_http_info( self, @@ -8647,7 +9634,10 @@ async def update_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8679,26 +9669,30 @@ async def update_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_resource_template_without_preload_content( self, @@ -8706,7 +9700,10 @@ async def update_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8738,22 +9735,26 @@ async def update_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTemplate", + '200': "ResourceTemplate", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_resource_template_serialize( self, workspace_id, @@ -8765,33 +9766,44 @@ def _update_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/workspaces/{workspace_id}/template", + method='PATCH', + resource_path='/api/workspaces/{workspace_id}/template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8801,9 +9813,12 @@ def _update_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_route( self, @@ -8813,7 +9828,10 @@ async def update_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8850,7 +9868,7 @@ async def update_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( workspace_id=workspace_id, @@ -8859,19 +9877,23 @@ async def update_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_route_with_http_info( self, @@ -8881,7 +9903,10 @@ async def update_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8918,7 +9943,7 @@ async def update_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( workspace_id=workspace_id, @@ -8927,19 +9952,23 @@ async def update_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_route_without_preload_content( self, @@ -8949,7 +9978,10 @@ async def update_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8986,7 +10018,7 @@ async def update_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( workspace_id=workspace_id, @@ -8995,15 +10027,19 @@ async def update_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + '200': "Route", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_route_serialize( self, workspace_id, @@ -9017,20 +10053,23 @@ def _update_route_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if route_id is not None: - _path_params["route_id"] = route_id + _path_params['route_id'] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -9038,24 +10077,37 @@ def _update_route_serialize( if route_update is not None: _body_params = route_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/workspaces/{workspace_id}/routes/{route_id}", + method='PATCH', + resource_path='/api/workspaces/{workspace_id}/routes/{route_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9065,9 +10117,12 @@ def _update_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_secret_attachment( self, @@ -9077,7 +10132,10 @@ async def update_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9113,7 +10171,7 @@ async def update_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( workspace_id=workspace_id, @@ -9122,19 +10180,23 @@ async def update_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_secret_attachment_with_http_info( self, @@ -9144,7 +10206,10 @@ async def update_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9180,7 +10245,7 @@ async def update_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( workspace_id=workspace_id, @@ -9189,19 +10254,23 @@ async def update_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_secret_attachment_without_preload_content( self, @@ -9211,7 +10280,10 @@ async def update_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9247,7 +10319,7 @@ async def update_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( workspace_id=workspace_id, @@ -9256,15 +10328,19 @@ async def update_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecretAttachment", + '200': "SecretAttachment", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_secret_attachment_serialize( self, workspace_id, @@ -9278,20 +10354,23 @@ def _update_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id if secret_attachment_id is not None: - _path_params["secret_attachment_id"] = secret_attachment_id + _path_params['secret_attachment_id'] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -9299,24 +10378,37 @@ def _update_secret_attachment_serialize( if secret_attachment_update is not None: _body_params = secret_attachment_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}", + method='PATCH', + resource_path='/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9326,9 +10418,12 @@ def _update_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_token( self, @@ -9337,7 +10432,10 @@ async def update_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9372,7 +10470,7 @@ async def update_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( workspace_id=workspace_id, @@ -9380,19 +10478,23 @@ async def update_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call async def update_token_with_http_info( self, @@ -9401,7 +10503,10 @@ async def update_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9436,7 +10541,7 @@ async def update_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( workspace_id=workspace_id, @@ -9444,19 +10549,23 @@ async def update_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) + @validate_call async def update_token_without_preload_content( self, @@ -9465,7 +10574,10 @@ async def update_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9500,7 +10612,7 @@ async def update_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( workspace_id=workspace_id, @@ -9508,15 +10620,19 @@ async def update_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResourceTokenInfo", + '200': "ResourceTokenInfo", } - response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) return response_data.response + def _update_token_serialize( self, workspace_id, @@ -9529,18 +10645,21 @@ def _update_token_serialize( _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params["workspace_id"] = workspace_id + _path_params['workspace_id'] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -9548,24 +10667,37 @@ def _update_token_serialize( if resource_token_update is not None: _body_params = resource_token_update + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: - _header_params["Content-Type"] = _content_type + _header_params['Content-Type'] = _content_type else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["bearerAuth"] + _auth_settings: List[str] = [ + 'bearerAuth' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/api/workspaces/{workspace_id}/token", + method='PATCH', + resource_path='/api/workspaces/{workspace_id}/token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9575,5 +10707,7 @@ def _update_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/saturn_api/api_client.py b/saturn_api/api_client.py index f7b2ec9..51cb5a9 100644 --- a/saturn_api/api_client.py +++ b/saturn_api/api_client.py @@ -1,17 +1,19 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + + import datetime +from dateutil.parser import parse +from enum import Enum import decimal import json import mimetypes @@ -19,31 +21,27 @@ import re import tempfile import uuid -from enum import Enum -from typing import Dict, List, Optional, Tuple, Union -from urllib.parse import quote -from dateutil.parser import parse +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union from pydantic import SecretStr +from saturn_api.configuration import Configuration +from saturn_api.api_response import ApiResponse, T as ApiResponseT import saturn_api.models from saturn_api import rest -from saturn_api.api_response import ApiResponse -from saturn_api.api_response import T as ApiResponseT -from saturn_api.configuration import Configuration from saturn_api.exceptions import ( - ApiException, ApiValueError, + ApiException, BadRequestException, + UnauthorizedException, ForbiddenException, NotFoundException, - ServiceException, - UnauthorizedException, + ServiceException ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - class ApiClient: """Generic API client for OpenAPI client library builds. @@ -62,20 +60,25 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - "int": int, - "long": int, # TODO remove as only py3 is supported? - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "decimal": decimal.Decimal, - "object": object, + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, + 'object': object, } _pool = None def __init__( - self, configuration=None, header_name=None, header_value=None, cookie=None + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -88,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.0/python" + self.user_agent = 'OpenAPI-Generator/1.0.0/python' self.client_side_validation = configuration.client_side_validation async def __aenter__(self): @@ -103,15 +106,16 @@ async def close(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers["User-Agent"] + return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - self.default_headers["User-Agent"] = value + self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value + _default = None @classmethod @@ -147,12 +151,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, - auth_settings=None, + files=None, auth_settings=None, collection_formats=None, _host=None, - _request_auth=None, + _request_auth=None ) -> RequestSerialized: + """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -181,26 +185,35 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params["Cookie"] = self.cookie + header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) if files: post_params.extend(self.files_parameters(files)) @@ -212,7 +225,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth, + request_auth=_request_auth ) # body @@ -229,13 +242,23 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) url += "?" + url_query return method, url, header_params, body, post_params + async def call_api( - self, method, url, header_params=None, body=None, post_params=None, _request_timeout=None + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -252,12 +275,10 @@ async def call_api( try: # perform request and return response response_data = await self.rest_client.request( - method, - url, + method, url, headers=header_params, - body=body, - post_params=post_params, - _request_timeout=_request_timeout, + body=body, post_params=post_params, + _request_timeout=_request_timeout ) except ApiException as e: @@ -268,7 +289,7 @@ async def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]] = None, + response_types_map: Optional[Dict[str, ApiResponseT]]=None ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -280,11 +301,7 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if ( - not response_type - and isinstance(response_data.status, int) - and 100 <= response_data.status <= 599 - ): + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) @@ -292,13 +309,13 @@ def response_deserialize( response_text = None return_data = None try: - if response_type == "bytearray": + if response_type in ("bytearray", "bytes"): return_data = response_data.data elif response_type == "file": return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.getheader("content-type") + content_type = response_data.headers.get('content-type') if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" @@ -313,10 +330,10 @@ def response_deserialize( ) return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.getheaders(), - raw_data=response_data.data, + status_code = response_data.status, + data = return_data, + headers = response_data.headers, + raw_data = response_data.data ) def sanitize_for_serialization(self, obj): @@ -346,32 +363,35 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, uuid.UUID): return str(obj) elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): return str(obj) - elif isinstance(obj, dict): - obj_dict = obj + return { + key: self.sanitize_for_serialization(val) + for key, val in obj.items() + } + + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ + obj_dict = obj.__dict__ - if isinstance(obj_dict, list): - # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() - return self.sanitize_for_serialization(obj_dict) + return self.sanitize_for_serialization(obj_dict) - return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. @@ -390,18 +410,17 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif re.match( - r"^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE - ): + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): data = response_text else: raise ApiException( - status=0, reason="Unsupported content type: {0}".format(content_type) + status=0, + reason="Unsupported content type: {0}".format(content_type) ) return self.__deserialize(data, response_type) @@ -418,17 +437,19 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith("List["): - m = re.match(r"List\[(.*)]", klass) + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] - if klass.startswith("Dict["): - m = re.match(r"Dict\[([^,]*), (.*)]", klass) + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -446,6 +467,8 @@ def __deserialize(self, data, klass): return self.__deserialize_datetime(data) elif klass is decimal.Decimal: return decimal.Decimal(data) + elif klass is uuid.UUID: + return uuid.UUID(data) elif issubclass(klass, Enum): return self.__deserialize_enum(data, klass) else: @@ -464,18 +487,19 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": + if collection_format == 'multi': new_params.extend((k, value) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(str(value) for value in v))) + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -500,18 +524,20 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": + if collection_format == 'multi': new_params.extend((k, quote(str(value))) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(quote(str(value)) for value in v))) + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) else: new_params.append((k, quote(str(v)))) @@ -529,7 +555,7 @@ def files_parameters( params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, "rb") as f: + with open(v, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -543,8 +569,13 @@ def files_parameters( continue else: raise ValueError("Unsupported file value") - mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" - params.append(tuple([k, tuple([filename, filedata, mimetype])])) + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -557,7 +588,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search("json", accept, re.IGNORECASE): + if re.search('json', accept, re.IGNORECASE): return accept return accepts[0] @@ -572,13 +603,20 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search("json", content_type, re.IGNORECASE): + if re.search('json', content_type, re.IGNORECASE): return content_type return content_types[0] def update_params_for_auth( - self, headers, queries, auth_settings, resource_path, method, body, request_auth=None + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None ) -> None: """Updates header and query params based on authentication setting. @@ -596,17 +634,35 @@ def update_params_for_auth( return if request_auth: - self._apply_auth_params(headers, queries, resource_path, method, body, request_auth) + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting + headers, + queries, + resource_path, + method, + body, + auth_setting ) def _apply_auth_params( - self, headers, queries, resource_path, method, body, auth_setting + self, + headers, + queries, + resource_path, + method, + body, + auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -618,15 +674,17 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting["in"] == "cookie": - headers["Cookie"] = auth_setting["value"] - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - queries.append((auth_setting["key"], auth_setting["value"])) + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) else: - raise ApiValueError("Authentication token must be in `query` or `header`") + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) def __deserialize_file(self, response): """Deserializes body to file @@ -644,11 +702,16 @@ def __deserialize_file(self, response): os.close(fd) os.remove(path) - content_disposition = response.getheader("Content-Disposition") + content_disposition = response.headers.get("Content-Disposition") if content_disposition: - m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) + filename = os.path.basename(m.group(1)) # Strip any directory traversal + if filename in ("", ".", ".."): # fall back to tmp filename + filename = os.path.basename(path) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -690,7 +753,8 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, reason="Failed to parse `{0}` as date object".format(string) + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -707,7 +771,11 @@ def __deserialize_datetime(self, string): return string except ValueError: raise rest.ApiException( - status=0, reason=("Failed to parse `{0}` as datetime object".format(string)) + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) ) def __deserialize_enum(self, data, klass): @@ -721,7 +789,11 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) ) def __deserialize_model(self, data, klass): diff --git a/saturn_api/api_response.py b/saturn_api/api_response.py index ca801da..9bc7c11 100644 --- a/saturn_api/api_response.py +++ b/saturn_api/api_response.py @@ -1,14 +1,11 @@ """API response object.""" from __future__ import annotations - -from typing import Generic, Mapping, Optional, TypeVar - -from pydantic import BaseModel, Field, StrictBytes, StrictInt +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel T = TypeVar("T") - class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -19,4 +16,6 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = {"arbitrary_types_allowed": True} + model_config = { + "arbitrary_types_allowed": True + } diff --git a/saturn_api/configuration.py b/saturn_api/configuration.py index a4e467a..04d5744 100644 --- a/saturn_api/configuration.py +++ b/saturn_api/configuration.py @@ -1,38 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + import copy import http.client as httplib import logging +from logging import FileHandler import os import sys -from logging import FileHandler from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self import urllib3 -from typing_extensions import NotRequired, Self + JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' } ServerVariablesT = Dict[str, str] @@ -178,26 +173,27 @@ class Configuration: def __init__( self, - host: Optional[str] = None, - api_key: Optional[Dict[str, str]] = None, - api_key_prefix: Optional[Dict[str, str]] = None, - username: Optional[str] = None, - password: Optional[str] = None, - access_token: Optional[str] = None, - server_index: Optional[int] = None, - server_variables: Optional[ServerVariablesT] = None, - server_operation_index: Optional[Dict[int, int]] = None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]] = None, - ignore_operation_servers: bool = False, - ssl_ca_cert: Optional[str] = None, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, retries: Optional[int] = None, ca_cert_data: Optional[Union[str, bytes]] = None, - cert_file: Optional[str] = None, - key_file: Optional[str] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, *, debug: Optional[bool] = None, ) -> None: - """Constructor""" + """Constructor + """ if host is None: host = os.getenv("SATURN_BASE_URL", None) self._base_path = "http://localhost" if host is None else host @@ -237,9 +233,7 @@ def __init__( self.password = password """Password for HTTP basic authentication """ - self.access_token = ( - os.getenv("SATURN_TOKEN", None) if access_token is None else access_token - ) + self.access_token = os.getenv("SATURN_TOKEN", None) if access_token is None else access_token """Access token """ self.logger = {} @@ -247,7 +241,7 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("saturn_api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" + self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None @@ -303,7 +297,7 @@ def __init__( self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = "" + self.safe_chars_for_path_param = '' """Safe chars for path_param """ self.retries = retries @@ -324,12 +318,12 @@ def __init__( """date format """ - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ("logger", "logger_file_handler"): + if k not in ('logger', 'logger_file_handler'): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -461,9 +455,7 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix( - self, identifier: str, alias: Optional[str] = None - ) -> Optional[str]: + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -493,20 +485,22 @@ def get_basic_auth_token(self) -> Optional[str]: password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') - def auth_settings(self) -> AuthSettings: + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ auth: AuthSettings = {} if self.access_token is not None: - auth["bearerAuth"] = { - "type": "bearer", - "in": "header", - "key": "Authorization", - "value": "Bearer " + self.access_token, + auth['bearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token } return auth @@ -515,13 +509,12 @@ def to_debug_report(self) -> str: :return: The report for debugging. """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 2026.02.01\n" - "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) - ) + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 2026.02.01\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings @@ -530,16 +523,16 @@ def get_host_settings(self) -> List[HostSetting]: """ return [ { - "url": "", - "description": "No description provided", + 'url': "", + 'description': "No description provided", } ] def get_host_from_settings( self, index: Optional[int], - variables: Optional[ServerVariablesT] = None, - servers: Optional[List[HostSetting]] = None, + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings @@ -558,22 +551,22 @@ def get_host_from_settings( except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers)) - ) + "Must be less than {1}".format(index, len(servers))) - url = server["url"] + url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) - if "enum_values" in variable and used_value not in variable["enum_values"]: + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], variable["enum_values"] - ) - ) + variable_name, variables[variable_name], + variable['enum_values'])) url = url.replace("{" + variable_name + "}", used_value) diff --git a/saturn_api/exceptions.py b/saturn_api/exceptions.py index 10a69f2..c9efbdf 100644 --- a/saturn_api/exceptions.py +++ b/saturn_api/exceptions.py @@ -1,28 +1,26 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from typing import Any, Optional +from typing import Any, Optional from typing_extensions import Self - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) -> None: - """Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors Args: msg (str): the exception message @@ -105,9 +103,9 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -126,17 +124,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode("utf-8") + self.body = http_resp.data.decode('utf-8') except Exception: pass - self.headers = http_resp.getheaders() + self.headers = http_resp.headers @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -164,12 +162,17 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) + error_message += "HTTP response headers: {0}\n".format( + self.headers) - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + if self.data: + error_message += "HTTP response data: {0}\n".format(self.data) return error_message @@ -196,12 +199,12 @@ class ServiceException(ApiException): class ConflictException(ApiException): """Exception for HTTP 409 Conflict.""" - + pass class UnprocessableEntityException(ApiException): """Exception for HTTP 422 Unprocessable Entity.""" - + pass def render_path(path_to_item): diff --git a/saturn_api/models/__init__.py b/saturn_api/models/__init__.py index f766943..74a8e9f 100644 --- a/saturn_api/models/__init__.py +++ b/saturn_api/models/__init__.py @@ -2,14 +2,14 @@ # flake8: noqa """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 # import models into model package @@ -28,6 +28,11 @@ from saturn_api.models.authorization_refresh_grant import AuthorizationRefreshGrant from saturn_api.models.authorization_token_response import AuthorizationTokenResponse from saturn_api.models.build_data import BuildData +from saturn_api.models.cluster import Cluster +from saturn_api.models.cluster_connection_type import ClusterConnectionType +from saturn_api.models.cluster_create import ClusterCreate +from saturn_api.models.cluster_list import ClusterList +from saturn_api.models.cluster_update import ClusterUpdate from saturn_api.models.concurrency_policy import ConcurrencyPolicy from saturn_api.models.condition import Condition from saturn_api.models.container_runtime_summary import ContainerRuntimeSummary @@ -40,9 +45,7 @@ from saturn_api.models.dask_cluster import DaskCluster from saturn_api.models.dask_cluster_adapt import DaskClusterAdapt from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment -from saturn_api.models.dask_cluster_attachment_scheduler import ( - DaskClusterAttachmentScheduler, -) +from saturn_api.models.dask_cluster_attachment_scheduler import DaskClusterAttachmentScheduler from saturn_api.models.dask_cluster_attachment_worker import DaskClusterAttachmentWorker from saturn_api.models.dask_cluster_create import DaskClusterCreate from saturn_api.models.dask_cluster_list import DaskClusterList @@ -52,9 +55,7 @@ from saturn_api.models.dask_cluster_server_options import DaskClusterServerOptions from saturn_api.models.dask_cluster_update import DaskClusterUpdate from saturn_api.models.dask_components import DaskComponents -from saturn_api.models.dask_worker_runtime_summary_list import ( - DaskWorkerRuntimeSummaryList, -) +from saturn_api.models.dask_worker_runtime_summary_list import DaskWorkerRuntimeSummaryList from saturn_api.models.dask_worker_summary import DaskWorkerSummary from saturn_api.models.data_point import DataPoint from saturn_api.models.default_images import DefaultImages @@ -72,19 +73,11 @@ from saturn_api.models.deployment_update import DeploymentUpdate from saturn_api.models.external_repo import ExternalRepo from saturn_api.models.external_repo_attachment import ExternalRepoAttachment -from saturn_api.models.external_repo_attachment_create import ( - ExternalRepoAttachmentCreate, -) +from saturn_api.models.external_repo_attachment_create import ExternalRepoAttachmentCreate from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) -from saturn_api.models.external_repo_attachment_recipe import ( - ExternalRepoAttachmentRecipe, -) -from saturn_api.models.external_repo_attachment_update import ( - ExternalRepoAttachmentUpdate, -) +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe +from saturn_api.models.external_repo_attachment_update import ExternalRepoAttachmentUpdate from saturn_api.models.external_repo_create import ExternalRepoCreate from saturn_api.models.external_repo_list import ExternalRepoList from saturn_api.models.external_repo_update import ExternalRepoUpdate @@ -156,35 +149,23 @@ from saturn_api.models.notification_list import NotificationList from saturn_api.models.notification_subscribe import NotificationSubscribe from saturn_api.models.notification_subscription import NotificationSubscription -from saturn_api.models.notification_subscription_list import ( - NotificationSubscriptionList, -) +from saturn_api.models.notification_subscription_list import NotificationSubscriptionList from saturn_api.models.notification_unsubscribe import NotificationUnsubscribe -from saturn_api.models.object_storage_bulk_delete_results import ( - ObjectStorageBulkDeleteResults, -) +from saturn_api.models.object_storage_bulk_delete_results import ObjectStorageBulkDeleteResults from saturn_api.models.object_storage_bulk_download import ObjectStorageBulkDownload from saturn_api.models.object_storage_bulk_reference import ObjectStorageBulkReference from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart -from saturn_api.models.object_storage_completed_upload import ( - ObjectStorageCompletedUpload, -) +from saturn_api.models.object_storage_completed_upload import ObjectStorageCompletedUpload from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource from saturn_api.models.object_storage_dir_details import ObjectStorageDirDetails from saturn_api.models.object_storage_file_details import ObjectStorageFileDetails from saturn_api.models.object_storage_list import ObjectStorageList -from saturn_api.models.object_storage_presigned_download import ( - ObjectStoragePresignedDownload, -) +from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart -from saturn_api.models.object_storage_presigned_upload import ( - ObjectStoragePresignedUpload, -) +from saturn_api.models.object_storage_presigned_upload import ObjectStoragePresignedUpload from saturn_api.models.object_storage_reference import ObjectStorageReference from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner -from saturn_api.models.object_storage_shared_owner_list import ( - ObjectStorageSharedOwnerList, -) +from saturn_api.models.object_storage_shared_owner_list import ObjectStorageSharedOwnerList from saturn_api.models.object_storage_upload import ObjectStorageUpload from saturn_api.models.object_storage_upload_create import ObjectStorageUploadCreate from saturn_api.models.object_storage_upload_list import ObjectStorageUploadList @@ -240,7 +221,17 @@ from saturn_api.models.route_create import RouteCreate from saturn_api.models.route_list import RouteList from saturn_api.models.route_reference import RouteReference +from saturn_api.models.route_state import RouteState from saturn_api.models.route_update import RouteUpdate +from saturn_api.models.ssh_private_key import SSHPrivateKey +from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate +from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList +from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial +from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate +from saturn_api.models.ssh_public_key import SSHPublicKey +from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate +from saturn_api.models.ssh_public_key_list import SSHPublicKeyList +from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate from saturn_api.models.secret import Secret from saturn_api.models.secret_access_level import SecretAccessLevel from saturn_api.models.secret_attachment import SecretAttachment @@ -257,44 +248,23 @@ from saturn_api.models.service_account import ServiceAccount from saturn_api.models.service_account_attachment import ServiceAccountAttachment from saturn_api.models.service_account_create import ServiceAccountCreate -from saturn_api.models.service_account_create_attachment import ( - ServiceAccountCreateAttachment, -) +from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement -from saturn_api.models.service_account_entitlement_create import ( - ServiceAccountEntitlementCreate, -) -from saturn_api.models.service_account_entitlement_list import ( - ServiceAccountEntitlementList, -) +from saturn_api.models.service_account_entitlement_create import ServiceAccountEntitlementCreate +from saturn_api.models.service_account_entitlement_list import ServiceAccountEntitlementList from saturn_api.models.service_account_list import ServiceAccountList from saturn_api.models.service_account_update import ServiceAccountUpdate from saturn_api.models.shared_access_mode import SharedAccessMode from saturn_api.models.shared_folder import SharedFolder from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel from saturn_api.models.shared_folder_attachment import SharedFolderAttachment -from saturn_api.models.shared_folder_attachment_create import ( - SharedFolderAttachmentCreate, -) +from saturn_api.models.shared_folder_attachment_create import SharedFolderAttachmentCreate from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList -from saturn_api.models.shared_folder_attachment_recipe import ( - SharedFolderAttachmentRecipe, -) -from saturn_api.models.shared_folder_attachment_update import ( - SharedFolderAttachmentUpdate, -) +from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe +from saturn_api.models.shared_folder_attachment_update import SharedFolderAttachmentUpdate from saturn_api.models.shared_folder_create import SharedFolderCreate from saturn_api.models.shared_folder_list import SharedFolderList from saturn_api.models.shared_folder_update import SharedFolderUpdate -from saturn_api.models.ssh_private_key import SSHPrivateKey -from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate -from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList -from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial -from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate -from saturn_api.models.ssh_public_key import SSHPublicKey -from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate -from saturn_api.models.ssh_public_key_list import SSHPublicKeyList -from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate from saturn_api.models.stats import Stats from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.usage_limits_create import UsageLimitsCreate @@ -330,3 +300,4 @@ from saturn_api.models.workspace_spec import WorkspaceSpec from saturn_api.models.workspace_start import WorkspaceStart from saturn_api.models.workspace_update import WorkspaceUpdate + diff --git a/saturn_api/models/active_resource_list.py b/saturn_api/models/active_resource_list.py index bdaa75e..c64b83c 100644 --- a/saturn_api/models/active_resource_list.py +++ b/saturn_api/models/active_resource_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.resource import Resource - +from typing import Literal, Optional, Set +from typing_extensions import Self class ActiveResourceList(BaseModel): """ ActiveResourceList - """ # noqa: E501 - + """ # noqa: E501 resources: List[Resource] = Field(description="List of resources that are currently active.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ActiveResourceList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "resources", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "resources", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_resources in self.resources: if _item_resources: _items.append(_item_resources.to_dict()) - _dict["resources"] = _items + _dict['resources'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "resources": ( - [Resource.from_dict(_item) for _item in obj["resources"]] - if obj.get("resources") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "resources": [Resource.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/aggregated_usage.py b/saturn_api/models/aggregated_usage.py index 5cc60eb..ab78662 100644 --- a/saturn_api/models/aggregated_usage.py +++ b/saturn_api/models/aggregated_usage.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set, Union +import json from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Literal, Optional, Set from typing_extensions import Self - class AggregatedUsage(BaseModel): """ AggregatedUsage - """ # noqa: E501 - + """ # noqa: E501 hours: Union[StrictFloat, StrictInt] = Field(description="Compute hours used.") dollars: Union[StrictFloat, StrictInt] = Field(description="Dollars spent.") __properties: ClassVar[List[str]] = ["hours", "dollars"] @@ -37,6 +36,7 @@ class AggregatedUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,5 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"hours": obj.get("hours"), "dollars": obj.get("dollars")}) + _obj = cls.model_validate({ + "hours": obj.get("hours"), + "dollars": obj.get("dollars") + }) return _obj + + diff --git a/saturn_api/models/api_status.py b/saturn_api/models/api_status.py index b42688e..d59a4f1 100644 --- a/saturn_api/models/api_status.py +++ b/saturn_api/models/api_status.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ApiStatus(BaseModel): """ ApiStatus - """ # noqa: E501 - + """ # noqa: E501 status: StrictStr = Field(description="API availability.") version: StrictStr = Field(description="API version.") __properties: ClassVar[List[str]] = ["status", "version"] @@ -37,6 +36,7 @@ class ApiStatus(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,12 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "status", - "version", - ] - ) + excluded_fields: Set[str] = set([ + "status", + "version", + ]) _dict = self.model_dump( by_alias=True, @@ -86,5 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"status": obj.get("status"), "version": obj.get("version")}) + _obj = cls.model_validate({ + "status": obj.get("status"), + "version": obj.get("version") + }) return _obj + + diff --git a/saturn_api/models/api_token.py b/saturn_api/models/api_token.py index b910e96..0aa3414 100644 --- a/saturn_api/models/api_token.py +++ b/saturn_api/models/api_token.py @@ -1,57 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ApiToken(BaseModel): """ ApiToken - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the token.") description: StrictStr = Field(description="Description of what the API token is used for.") created_at: datetime = Field(description="Timestamp from when the token was created.") expires_at: Optional[datetime] = Field(description="Token expiration timestamp.") - refresh_expires_at: Optional[datetime] = Field( - description="Refresh token expiration timestamp." - ) + refresh_expires_at: Optional[datetime] = Field(description="Refresh token expiration timestamp.") scope: Optional[StrictStr] = Field(description="Permission scope of the token.") user_id: Optional[StrictStr] = Field(description="User ID associated with the token.") group_id: Optional[StrictStr] = Field(description="Group ID associated with the token.") access_token: StrictStr = Field(description="API access token.") refresh_token: Optional[StrictStr] = Field(default=None, description="API refresh token.") - __properties: ClassVar[List[str]] = [ - "id", - "description", - "created_at", - "expires_at", - "refresh_expires_at", - "scope", - "user_id", - "group_id", - "access_token", - "refresh_token", - ] + __properties: ClassVar[List[str]] = ["id", "description", "created_at", "expires_at", "refresh_expires_at", "scope", "user_id", "group_id", "access_token", "refresh_token"] model_config = ConfigDict( populate_by_name=True, @@ -59,6 +45,7 @@ class ApiToken(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -93,20 +80,18 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "description", - "created_at", - "expires_at", - "refresh_expires_at", - "scope", - "user_id", - "group_id", - "access_token", - "refresh_token", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "description", + "created_at", + "expires_at", + "refresh_expires_at", + "scope", + "user_id", + "group_id", + "access_token", + "refresh_token", + ]) _dict = self.model_dump( by_alias=True, @@ -116,32 +101,32 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict["expires_at"] = None + _dict['expires_at'] = None # set to None if refresh_expires_at (nullable) is None # and model_fields_set contains the field if self.refresh_expires_at is None and "refresh_expires_at" in self.model_fields_set: - _dict["refresh_expires_at"] = None + _dict['refresh_expires_at'] = None # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict["scope"] = None + _dict['scope'] = None # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict["user_id"] = None + _dict['user_id'] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict["group_id"] = None + _dict['group_id'] = None # set to None if refresh_token (nullable) is None # and model_fields_set contains the field if self.refresh_token is None and "refresh_token" in self.model_fields_set: - _dict["refresh_token"] = None + _dict['refresh_token'] = None return _dict @@ -154,18 +139,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "refresh_expires_at": obj.get("refresh_expires_at"), - "scope": obj.get("scope"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "access_token": obj.get("access_token"), - "refresh_token": obj.get("refresh_token"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "refresh_expires_at": obj.get("refresh_expires_at"), + "scope": obj.get("scope"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "access_token": obj.get("access_token"), + "refresh_token": obj.get("refresh_token") + }) return _obj + + diff --git a/saturn_api/models/api_token_create.py b/saturn_api/models/api_token_create.py index a8b2639..ef451ee 100644 --- a/saturn_api/models/api_token_create.py +++ b/saturn_api/models/api_token_create.py @@ -1,54 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.identity_reference import IdentityReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ApiTokenCreate(BaseModel): """ ApiTokenCreate - """ # noqa: E501 - - identity: Optional[IdentityReference] = Field( - default=None, description="Reference to a user or group." - ) - description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( - default="", description="Description of what the API token is used for." - ) - expires_in: Optional[StrictInt] = Field( - default=None, description="Expiration of the token in seconds." - ) - refresh_expires_in: Optional[StrictInt] = Field( - default=None, description="Expiration of the refresh token in seconds." - ) + """ # noqa: E501 + identity: Optional[IdentityReference] = Field(default=None, description="Reference to a user or group.") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default='', description="Description of what the API token is used for.") + expires_in: Optional[StrictInt] = Field(default=None, description="Expiration of the token in seconds.") + refresh_expires_in: Optional[StrictInt] = Field(default=None, description="Expiration of the refresh token in seconds.") scope: Optional[StrictStr] = Field(default=None, description="Permission scope of the token.") - __properties: ClassVar[List[str]] = [ - "identity", - "description", - "expires_in", - "refresh_expires_in", - "scope", - ] + __properties: ClassVar[List[str]] = ["identity", "description", "expires_in", "refresh_expires_in", "scope"] model_config = ConfigDict( populate_by_name=True, @@ -56,6 +41,7 @@ class ApiTokenCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,21 +76,21 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() # set to None if expires_in (nullable) is None # and model_fields_set contains the field if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict["expires_in"] = None + _dict['expires_in'] = None # set to None if refresh_expires_in (nullable) is None # and model_fields_set contains the field if self.refresh_expires_in is None and "refresh_expires_in" in self.model_fields_set: - _dict["refresh_expires_in"] = None + _dict['refresh_expires_in'] = None # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict["scope"] = None + _dict['scope'] = None return _dict @@ -116,17 +103,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "identity": ( - IdentityReference.from_dict(obj["identity"]) - if obj.get("identity") is not None - else None - ), - "description": obj.get("description") if obj.get("description") is not None else "", - "expires_in": obj.get("expires_in"), - "refresh_expires_in": obj.get("refresh_expires_in"), - "scope": obj.get("scope"), - } - ) + _obj = cls.model_validate({ + "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "description": obj.get("description") if obj.get("description") is not None else '', + "expires_in": obj.get("expires_in"), + "refresh_expires_in": obj.get("refresh_expires_in"), + "scope": obj.get("scope") + }) return _obj + + diff --git a/saturn_api/models/api_token_info.py b/saturn_api/models/api_token_info.py index 579efd0..24e3600 100644 --- a/saturn_api/models/api_token_info.py +++ b/saturn_api/models/api_token_info.py @@ -1,53 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ApiTokenInfo(BaseModel): """ ApiTokenInfo - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the token.") description: StrictStr = Field(description="Description of what the API token is used for.") created_at: datetime = Field(description="Timestamp from when the token was created.") expires_at: Optional[datetime] = Field(description="Token expiration timestamp.") - refresh_expires_at: Optional[datetime] = Field( - description="Refresh token expiration timestamp." - ) + refresh_expires_at: Optional[datetime] = Field(description="Refresh token expiration timestamp.") scope: Optional[StrictStr] = Field(description="Permission scope of the token.") user_id: Optional[StrictStr] = Field(description="User ID associated with the token.") group_id: Optional[StrictStr] = Field(description="Group ID associated with the token.") - __properties: ClassVar[List[str]] = [ - "id", - "description", - "created_at", - "expires_at", - "refresh_expires_at", - "scope", - "user_id", - "group_id", - ] + __properties: ClassVar[List[str]] = ["id", "description", "created_at", "expires_at", "refresh_expires_at", "scope", "user_id", "group_id"] model_config = ConfigDict( populate_by_name=True, @@ -55,6 +43,7 @@ class ApiTokenInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,18 +76,16 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "description", - "created_at", - "expires_at", - "refresh_expires_at", - "scope", - "user_id", - "group_id", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "description", + "created_at", + "expires_at", + "refresh_expires_at", + "scope", + "user_id", + "group_id", + ]) _dict = self.model_dump( by_alias=True, @@ -108,27 +95,27 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict["expires_at"] = None + _dict['expires_at'] = None # set to None if refresh_expires_at (nullable) is None # and model_fields_set contains the field if self.refresh_expires_at is None and "refresh_expires_at" in self.model_fields_set: - _dict["refresh_expires_at"] = None + _dict['refresh_expires_at'] = None # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict["scope"] = None + _dict['scope'] = None # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict["user_id"] = None + _dict['user_id'] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict["group_id"] = None + _dict['group_id'] = None return _dict @@ -141,16 +128,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "refresh_expires_at": obj.get("refresh_expires_at"), - "scope": obj.get("scope"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "refresh_expires_at": obj.get("refresh_expires_at"), + "scope": obj.get("scope"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id") + }) return _obj + + diff --git a/saturn_api/models/api_token_list.py b/saturn_api/models/api_token_list.py index 7aa360a..c81cd29 100644 --- a/saturn_api/models/api_token_list.py +++ b/saturn_api/models/api_token_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.api_token_info import ApiTokenInfo - +from typing import Literal, Optional, Set +from typing_extensions import Self class ApiTokenList(BaseModel): """ ApiTokenList - """ # noqa: E501 - + """ # noqa: E501 tokens: List[ApiTokenInfo] = Field(description="List of API token info.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ApiTokenList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "tokens", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "tokens", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_tokens in self.tokens: if _item_tokens: _items.append(_item_tokens.to_dict()) - _dict["tokens"] = _items + _dict['tokens'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "tokens": ( - [ApiTokenInfo.from_dict(_item) for _item in obj["tokens"]] - if obj.get("tokens") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "tokens": [ApiTokenInfo.from_dict(_item) for _item in obj["tokens"]] if obj.get("tokens") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/api_token_update.py b/saturn_api/models/api_token_update.py index f4df5df..12da24e 100644 --- a/saturn_api/models/api_token_update.py +++ b/saturn_api/models/api_token_update.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class ApiTokenUpdate(BaseModel): """ ApiTokenUpdate - """ # noqa: E501 - - description: Annotated[str, Field(strict=True, max_length=255)] = Field( - description="Description of what the API token is used for." - ) + """ # noqa: E501 + description: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Description of what the API token is used for.") __properties: ClassVar[List[str]] = ["description"] model_config = ConfigDict( @@ -38,6 +36,7 @@ class ApiTokenUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"description": obj.get("description")}) + _obj = cls.model_validate({ + "description": obj.get("description") + }) return _obj + + diff --git a/saturn_api/models/app_info.py b/saturn_api/models/app_info.py index 57dda3c..5f5e900 100644 --- a/saturn_api/models/app_info.py +++ b/saturn_api/models/app_info.py @@ -1,91 +1,53 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.auth0_info import Auth0Info from saturn_api.models.white_label_configuration import WhiteLabelConfiguration - +from typing import Literal, Optional, Set +from typing_extensions import Self class AppInfo(BaseModel): """ AppInfo - """ # noqa: E501 - + """ # noqa: E501 cloud_provider: StrictStr = Field(description="Name of the primary cloud provider.") is_multicluster: StrictBool = Field(description="True if installation spans multiple clusters.") - allow_deployment_public_access: StrictBool = Field( - description="True if unauthenticated deployment access is allowed." - ) + allow_deployment_public_access: StrictBool = Field(description="True if unauthenticated deployment access is allowed.") is_enterprise: StrictBool = Field(description="True if installation is Enterprise.") customer_name: StrictStr = Field(description="Name of the customer installation.") - stripe_public_key: Optional[StrictStr] = Field( - description="Public key for billing in non-enterprise installations." - ) + stripe_public_key: Optional[StrictStr] = Field(description="Public key for billing in non-enterprise installations.") hotjar_user_tracking: StrictBool = Field(description="True if hotjar is enabled.") version: StrictStr = Field(description="Version of the API.") auth0: Auth0Info = Field(description="Configuration for auth0 authentication.") - network_filesystem_enabled: StrictBool = Field( - description="True if NFS shared folders are enabled." - ) - git_repo_clone_dir: StrictStr = Field( - description="Default directory to clone git repositories into." - ) - app_serving_domain: StrictStr = Field( - description="Root domain for deployment and workspace URLs." - ) + network_filesystem_enabled: StrictBool = Field(description="True if NFS shared folders are enabled.") + git_repo_clone_dir: StrictStr = Field(description="Default directory to clone git repositories into.") + app_serving_domain: StrictStr = Field(description="Root domain for deployment and workspace URLs.") dind_enabled: StrictBool = Field(description="True if docker-in-docker is enabled.") - apply_requires_confirm: StrictBool = Field( - description="True if recipe apply should be confirmed." - ) + apply_requires_confirm: StrictBool = Field(description="True if recipe apply should be confirmed.") hide_invitations: StrictBool = Field(description="True if invitations are hidden in frontend.") populate_examples: StrictBool = Field(description="True if saturn examples are included.") - whitelabel: WhiteLabelConfiguration = Field( - description="Configuration for whitelabeled installations." - ) - hide_resource_creation_bar: StrictBool = Field( - description="True if resource creation bar should be hidden." - ) + whitelabel: WhiteLabelConfiguration = Field(description="Configuration for whitelabeled installations.") + hide_resource_creation_bar: StrictBool = Field(description="True if resource creation bar should be hidden.") user_tracking: StrictBool = Field(description="True if intercomm tracking is enabled.") - __properties: ClassVar[List[str]] = [ - "cloud_provider", - "is_multicluster", - "allow_deployment_public_access", - "is_enterprise", - "customer_name", - "stripe_public_key", - "hotjar_user_tracking", - "version", - "auth0", - "network_filesystem_enabled", - "git_repo_clone_dir", - "app_serving_domain", - "dind_enabled", - "apply_requires_confirm", - "hide_invitations", - "populate_examples", - "whitelabel", - "hide_resource_creation_bar", - "user_tracking", - ] + __properties: ClassVar[List[str]] = ["cloud_provider", "is_multicluster", "allow_deployment_public_access", "is_enterprise", "customer_name", "stripe_public_key", "hotjar_user_tracking", "version", "auth0", "network_filesystem_enabled", "git_repo_clone_dir", "app_serving_domain", "dind_enabled", "apply_requires_confirm", "hide_invitations", "populate_examples", "whitelabel", "hide_resource_creation_bar", "user_tracking"] model_config = ConfigDict( populate_by_name=True, @@ -93,6 +55,7 @@ class AppInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -117,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -126,14 +90,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of auth0 if self.auth0: - _dict["auth0"] = self.auth0.to_dict() + _dict['auth0'] = self.auth0.to_dict() # override the default output from pydantic by calling `to_dict()` of whitelabel if self.whitelabel: - _dict["whitelabel"] = self.whitelabel.to_dict() + _dict['whitelabel'] = self.whitelabel.to_dict() # set to None if stripe_public_key (nullable) is None # and model_fields_set contains the field if self.stripe_public_key is None and "stripe_public_key" in self.model_fields_set: - _dict["stripe_public_key"] = None + _dict['stripe_public_key'] = None return _dict @@ -146,33 +110,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "cloud_provider": obj.get("cloud_provider"), - "is_multicluster": obj.get("is_multicluster"), - "allow_deployment_public_access": obj.get("allow_deployment_public_access"), - "is_enterprise": obj.get("is_enterprise"), - "customer_name": obj.get("customer_name"), - "stripe_public_key": obj.get("stripe_public_key"), - "hotjar_user_tracking": obj.get("hotjar_user_tracking"), - "version": obj.get("version"), - "auth0": ( - Auth0Info.from_dict(obj["auth0"]) if obj.get("auth0") is not None else None - ), - "network_filesystem_enabled": obj.get("network_filesystem_enabled"), - "git_repo_clone_dir": obj.get("git_repo_clone_dir"), - "app_serving_domain": obj.get("app_serving_domain"), - "dind_enabled": obj.get("dind_enabled"), - "apply_requires_confirm": obj.get("apply_requires_confirm"), - "hide_invitations": obj.get("hide_invitations"), - "populate_examples": obj.get("populate_examples"), - "whitelabel": ( - WhiteLabelConfiguration.from_dict(obj["whitelabel"]) - if obj.get("whitelabel") is not None - else None - ), - "hide_resource_creation_bar": obj.get("hide_resource_creation_bar"), - "user_tracking": obj.get("user_tracking"), - } - ) + _obj = cls.model_validate({ + "cloud_provider": obj.get("cloud_provider"), + "is_multicluster": obj.get("is_multicluster"), + "allow_deployment_public_access": obj.get("allow_deployment_public_access"), + "is_enterprise": obj.get("is_enterprise"), + "customer_name": obj.get("customer_name"), + "stripe_public_key": obj.get("stripe_public_key"), + "hotjar_user_tracking": obj.get("hotjar_user_tracking"), + "version": obj.get("version"), + "auth0": Auth0Info.from_dict(obj["auth0"]) if obj.get("auth0") is not None else None, + "network_filesystem_enabled": obj.get("network_filesystem_enabled"), + "git_repo_clone_dir": obj.get("git_repo_clone_dir"), + "app_serving_domain": obj.get("app_serving_domain"), + "dind_enabled": obj.get("dind_enabled"), + "apply_requires_confirm": obj.get("apply_requires_confirm"), + "hide_invitations": obj.get("hide_invitations"), + "populate_examples": obj.get("populate_examples"), + "whitelabel": WhiteLabelConfiguration.from_dict(obj["whitelabel"]) if obj.get("whitelabel") is not None else None, + "hide_resource_creation_bar": obj.get("hide_resource_creation_bar"), + "user_tracking": obj.get("user_tracking") + }) return _obj + + diff --git a/saturn_api/models/auth0_info.py b/saturn_api/models/auth0_info.py index b9fb21c..77ef168 100644 --- a/saturn_api/models/auth0_info.py +++ b/saturn_api/models/auth0_info.py @@ -1,37 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class Auth0Info(BaseModel): """ Auth0Info - """ # noqa: E501 - + """ # noqa: E501 enabled: StrictBool = Field(description="True if auth0 authentication is enabled.") connections: Dict[str, StrictStr] = Field(description="Enabled auth providers.") - disable_native_login: StrictBool = Field( - description="True if native username/password login is disabled." - ) + disable_native_login: StrictBool = Field(description="True if native username/password login is disabled.") __properties: ClassVar[List[str]] = ["enabled", "connections", "disable_native_login"] model_config = ConfigDict( @@ -40,6 +37,7 @@ class Auth0Info(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +81,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "enabled": obj.get("enabled"), - "connections": obj.get("connections"), - "disable_native_login": obj.get("disable_native_login"), - } - ) + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "connections": obj.get("connections"), + "disable_native_login": obj.get("disable_native_login") + }) return _obj + + diff --git a/saturn_api/models/authorization_code_grant.py b/saturn_api/models/authorization_code_grant.py index ad34ea8..92fb258 100644 --- a/saturn_api/models/authorization_code_grant.py +++ b/saturn_api/models/authorization_code_grant.py @@ -1,42 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class AuthorizationCodeGrant(BaseModel): """ AuthorizationCodeGrant - """ # noqa: E501 - - grant_type: Literal["authorization_code"] + """ # noqa: E501 + grant_type: Literal['authorization_code'] code: StrictStr = Field(description="OAuth response code.") code_verifier: StrictStr = Field(description="OAuth code verifier for the PKCE request.") redirect_uri: StrictStr = Field(description="OAuth redirect URI.") __properties: ClassVar[List[str]] = ["grant_type", "code", "code_verifier", "redirect_uri"] - @field_validator("grant_type") + @field_validator('grant_type') def grant_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["authorization_code"]): + if value not in set(['authorization_code']): raise ValueError("must be one of enum values ('authorization_code')") return value @@ -46,6 +45,7 @@ def grant_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +70,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +89,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "grant_type": obj.get("grant_type"), - "code": obj.get("code"), - "code_verifier": obj.get("code_verifier"), - "redirect_uri": obj.get("redirect_uri"), - } - ) + _obj = cls.model_validate({ + "grant_type": obj.get("grant_type"), + "code": obj.get("code"), + "code_verifier": obj.get("code_verifier"), + "redirect_uri": obj.get("redirect_uri") + }) return _obj + + diff --git a/saturn_api/models/authorization_grant.py b/saturn_api/models/authorization_grant.py index 70d044e..ac56497 100644 --- a/saturn_api/models/authorization_grant.py +++ b/saturn_api/models/authorization_grant.py @@ -1,51 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.authorization_code_grant import AuthorizationCodeGrant from saturn_api.models.authorization_refresh_grant import AuthorizationRefreshGrant +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar AUTHORIZATIONGRANT_ONE_OF_SCHEMAS = ["AuthorizationCodeGrant", "AuthorizationRefreshGrant"] -T = TypeVar( - "T", - AuthorizationCodeGrant, - AuthorizationRefreshGrant, - default=Union[AuthorizationCodeGrant, AuthorizationRefreshGrant], -) - +T = TypeVar("T", AuthorizationCodeGrant, AuthorizationRefreshGrant, default=Union[AuthorizationCodeGrant, AuthorizationRefreshGrant]) class AuthorizationGrant(RootModel[T]): """ AuthorizationGrant """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -82,3 +67,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/authorization_refresh_grant.py b/saturn_api/models/authorization_refresh_grant.py index 138e66b..4a9b2b3 100644 --- a/saturn_api/models/authorization_refresh_grant.py +++ b/saturn_api/models/authorization_refresh_grant.py @@ -1,40 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class AuthorizationRefreshGrant(BaseModel): """ AuthorizationRefreshGrant - """ # noqa: E501 - - grant_type: Literal["refresh_token"] + """ # noqa: E501 + grant_type: Literal['refresh_token'] refresh_token: StrictStr = Field(description="Refresh token for retrieving a new token pair.") __properties: ClassVar[List[str]] = ["grant_type", "refresh_token"] - @field_validator("grant_type") + @field_validator('grant_type') def grant_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["refresh_token"]): + if value not in set(['refresh_token']): raise ValueError("must be one of enum values ('refresh_token')") return value @@ -44,6 +43,7 @@ def grant_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +87,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"grant_type": obj.get("grant_type"), "refresh_token": obj.get("refresh_token")} - ) + _obj = cls.model_validate({ + "grant_type": obj.get("grant_type"), + "refresh_token": obj.get("refresh_token") + }) return _obj + + diff --git a/saturn_api/models/authorization_token_response.py b/saturn_api/models/authorization_token_response.py index 26dc864..33a6389 100644 --- a/saturn_api/models/authorization_token_response.py +++ b/saturn_api/models/authorization_token_response.py @@ -1,53 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class AuthorizationTokenResponse(BaseModel): """ AuthorizationTokenResponse - """ # noqa: E501 - + """ # noqa: E501 access_token: StrictStr = Field(description="API access token.") refresh_token: StrictStr = Field(description="API refresh token.") token_type: StrictStr = Field(description="Type of the token. Only 'Bearer' is supported.") expires_at: Optional[datetime] = Field(description="Token expiration timestamp.") - refresh_expires_at: Optional[datetime] = Field( - description="Refresh token expiration timestamp." - ) + refresh_expires_at: Optional[datetime] = Field(description="Refresh token expiration timestamp.") expires_in: Optional[StrictInt] = Field(description="Lifetime of the token in seconds.") - refresh_expires_in: Optional[StrictInt] = Field( - description="Lifetime of the refresh token in seconds." - ) - __properties: ClassVar[List[str]] = [ - "access_token", - "refresh_token", - "token_type", - "expires_at", - "refresh_expires_at", - "expires_in", - "refresh_expires_in", - ] + refresh_expires_in: Optional[StrictInt] = Field(description="Lifetime of the refresh token in seconds.") + __properties: ClassVar[List[str]] = ["access_token", "refresh_token", "token_type", "expires_at", "refresh_expires_at", "expires_in", "refresh_expires_in"] model_config = ConfigDict( populate_by_name=True, @@ -55,6 +42,7 @@ class AuthorizationTokenResponse(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,22 +78,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict["expires_at"] = None + _dict['expires_at'] = None # set to None if refresh_expires_at (nullable) is None # and model_fields_set contains the field if self.refresh_expires_at is None and "refresh_expires_at" in self.model_fields_set: - _dict["refresh_expires_at"] = None + _dict['refresh_expires_at'] = None # set to None if expires_in (nullable) is None # and model_fields_set contains the field if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict["expires_in"] = None + _dict['expires_in'] = None # set to None if refresh_expires_in (nullable) is None # and model_fields_set contains the field if self.refresh_expires_in is None and "refresh_expires_in" in self.model_fields_set: - _dict["refresh_expires_in"] = None + _dict['refresh_expires_in'] = None return _dict @@ -117,15 +106,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "access_token": obj.get("access_token"), - "refresh_token": obj.get("refresh_token"), - "token_type": obj.get("token_type"), - "expires_at": obj.get("expires_at"), - "refresh_expires_at": obj.get("refresh_expires_at"), - "expires_in": obj.get("expires_in"), - "refresh_expires_in": obj.get("refresh_expires_in"), - } - ) + _obj = cls.model_validate({ + "access_token": obj.get("access_token"), + "refresh_token": obj.get("refresh_token"), + "token_type": obj.get("token_type"), + "expires_at": obj.get("expires_at"), + "refresh_expires_at": obj.get("refresh_expires_at"), + "expires_in": obj.get("expires_in"), + "refresh_expires_in": obj.get("refresh_expires_in") + }) return _obj + + diff --git a/saturn_api/models/build_data.py b/saturn_api/models/build_data.py index 4921411..52cd7d4 100644 --- a/saturn_api/models/build_data.py +++ b/saturn_api/models/build_data.py @@ -1,70 +1,45 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class BuildData(BaseModel): """ BuildData - """ # noqa: E501 - + """ # noqa: E501 base_image: Optional[StrictStr] = Field(default=None, description="Base image to build from.") - environment_yml: Optional[StrictStr] = Field( - default=None, description="Conda environment to install." - ) - requirements_txt: Optional[StrictStr] = Field( - default=None, description="Pip requirements to install." - ) + environment_yml: Optional[StrictStr] = Field(default=None, description="Conda environment to install.") + requirements_txt: Optional[StrictStr] = Field(default=None, description="Pip requirements to install.") cran_packages: Optional[StrictStr] = Field(default=None, description="Cran packages to install") - bioconductor_packages: Optional[StrictStr] = Field( - default=None, description="Bioconductor packages to install." - ) - remotes_packages: Optional[StrictStr] = Field( - default=None, description="Remotes packages to install." - ) + bioconductor_packages: Optional[StrictStr] = Field(default=None, description="Bioconductor packages to install.") + remotes_packages: Optional[StrictStr] = Field(default=None, description="Remotes packages to install.") apt_txt: Optional[StrictStr] = Field(default=None, description="Apt packages to install.") post_build: Optional[StrictStr] = Field(default=None, description="Post-build script to run.") - use_mamba: Optional[StrictBool] = Field( - default=False, description="Enable installing conda packages with mamba" - ) + use_mamba: Optional[StrictBool] = Field(default=False, description="Enable installing conda packages with mamba") adapt_image: Optional[StrictBool] = False register_ipython_kernel: Optional[StrictBool] = None rstudio_version: Optional[StrictStr] = None install_r: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "base_image", - "environment_yml", - "requirements_txt", - "cran_packages", - "bioconductor_packages", - "remotes_packages", - "apt_txt", - "post_build", - "use_mamba", - "adapt_image", - "register_ipython_kernel", - "rstudio_version", - "install_r", - ] + __properties: ClassVar[List[str]] = ["base_image", "environment_yml", "requirements_txt", "cran_packages", "bioconductor_packages", "remotes_packages", "apt_txt", "post_build", "use_mamba", "adapt_image", "register_ipython_kernel", "rstudio_version", "install_r"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +47,7 @@ class BuildData(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -96,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -106,47 +83,47 @@ def to_dict(self) -> Dict[str, Any]: # set to None if base_image (nullable) is None # and model_fields_set contains the field if self.base_image is None and "base_image" in self.model_fields_set: - _dict["base_image"] = None + _dict['base_image'] = None # set to None if environment_yml (nullable) is None # and model_fields_set contains the field if self.environment_yml is None and "environment_yml" in self.model_fields_set: - _dict["environment_yml"] = None + _dict['environment_yml'] = None # set to None if requirements_txt (nullable) is None # and model_fields_set contains the field if self.requirements_txt is None and "requirements_txt" in self.model_fields_set: - _dict["requirements_txt"] = None + _dict['requirements_txt'] = None # set to None if cran_packages (nullable) is None # and model_fields_set contains the field if self.cran_packages is None and "cran_packages" in self.model_fields_set: - _dict["cran_packages"] = None + _dict['cran_packages'] = None # set to None if bioconductor_packages (nullable) is None # and model_fields_set contains the field if self.bioconductor_packages is None and "bioconductor_packages" in self.model_fields_set: - _dict["bioconductor_packages"] = None + _dict['bioconductor_packages'] = None # set to None if remotes_packages (nullable) is None # and model_fields_set contains the field if self.remotes_packages is None and "remotes_packages" in self.model_fields_set: - _dict["remotes_packages"] = None + _dict['remotes_packages'] = None # set to None if apt_txt (nullable) is None # and model_fields_set contains the field if self.apt_txt is None and "apt_txt" in self.model_fields_set: - _dict["apt_txt"] = None + _dict['apt_txt'] = None # set to None if post_build (nullable) is None # and model_fields_set contains the field if self.post_build is None and "post_build" in self.model_fields_set: - _dict["post_build"] = None + _dict['post_build'] = None # set to None if rstudio_version (nullable) is None # and model_fields_set contains the field if self.rstudio_version is None and "rstudio_version" in self.model_fields_set: - _dict["rstudio_version"] = None + _dict['rstudio_version'] = None return _dict @@ -159,23 +136,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "base_image": obj.get("base_image"), - "environment_yml": obj.get("environment_yml"), - "requirements_txt": obj.get("requirements_txt"), - "cran_packages": obj.get("cran_packages"), - "bioconductor_packages": obj.get("bioconductor_packages"), - "remotes_packages": obj.get("remotes_packages"), - "apt_txt": obj.get("apt_txt"), - "post_build": obj.get("post_build"), - "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, - "adapt_image": ( - obj.get("adapt_image") if obj.get("adapt_image") is not None else False - ), - "register_ipython_kernel": obj.get("register_ipython_kernel"), - "rstudio_version": obj.get("rstudio_version"), - "install_r": obj.get("install_r"), - } - ) + _obj = cls.model_validate({ + "base_image": obj.get("base_image"), + "environment_yml": obj.get("environment_yml"), + "requirements_txt": obj.get("requirements_txt"), + "cran_packages": obj.get("cran_packages"), + "bioconductor_packages": obj.get("bioconductor_packages"), + "remotes_packages": obj.get("remotes_packages"), + "apt_txt": obj.get("apt_txt"), + "post_build": obj.get("post_build"), + "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, + "adapt_image": obj.get("adapt_image") if obj.get("adapt_image") is not None else False, + "register_ipython_kernel": obj.get("register_ipython_kernel"), + "rstudio_version": obj.get("rstudio_version"), + "install_r": obj.get("install_r") + }) return _obj + + diff --git a/saturn_api/models/cluster.py b/saturn_api/models/cluster.py new file mode 100644 index 0000000..5415f9a --- /dev/null +++ b/saturn_api/models/cluster.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from saturn_api.models.cluster_connection_type import ClusterConnectionType +from typing import Literal, Optional, Set +from typing_extensions import Self + +class Cluster(BaseModel): + """ + Cluster + """ # noqa: E501 + id: StrictStr = Field(description="Cluster ID.") + name: StrictStr = Field(description="Cluster name.") + org_id: StrictStr = Field(description="Owning org ID.") + connection_type: ClusterConnectionType + server_url: Optional[StrictStr] = Field(default=None, description="K8s API server URL.") + utilities: Optional[Dict[str, Any]] = Field(default=None, description="ClusterUtilities metadata.") + created_at: StrictStr = Field(description="Creation timestamp.") + updated_at: StrictStr = Field(description="Last update timestamp.") + __properties: ClassVar[List[str]] = ["id", "name", "org_id", "connection_type", "server_url", "utilities", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Cluster from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "name", + "org_id", + "server_url", + "utilities", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if server_url (nullable) is None + # and model_fields_set contains the field + if self.server_url is None and "server_url" in self.model_fields_set: + _dict['server_url'] = None + + # set to None if utilities (nullable) is None + # and model_fields_set contains the field + if self.utilities is None and "utilities" in self.model_fields_set: + _dict['utilities'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Cluster from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "org_id": obj.get("org_id"), + "connection_type": obj.get("connection_type"), + "server_url": obj.get("server_url"), + "utilities": obj.get("utilities"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/saturn_api/models/cluster_connection_type.py b/saturn_api/models/cluster_connection_type.py new file mode 100644 index 0000000..d87651d --- /dev/null +++ b/saturn_api/models/cluster_connection_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClusterConnectionType(str, Enum): + """ + ClusterConnectionType + """ + + """ + allowed enum values + """ + INCLUSTER = 'incluster' + TOKEN = 'token' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClusterConnectionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/cluster_create.py b/saturn_api/models/cluster_create.py new file mode 100644 index 0000000..29ec102 --- /dev/null +++ b/saturn_api/models/cluster_create.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from saturn_api.models.cluster_connection_type import ClusterConnectionType +from typing import Literal, Optional, Set +from typing_extensions import Self + +class ClusterCreate(BaseModel): + """ + ClusterCreate + """ # noqa: E501 + name: StrictStr = Field(description="Unique name of the cluster.") + org_id: StrictStr = Field(description="ID of the org that owns the cluster.") + connection_type: ClusterConnectionType + server_url: Optional[StrictStr] = Field(default=None, description="K8s API server URL. Required when connection_type is 'token'.") + ca_bundle: Optional[StrictStr] = Field(default=None, description="Base64-encoded CA bundle. Required when connection_type is 'token'.") + token: Optional[StrictStr] = Field(default=None, description="Bearer token for k8s API. Required when connection_type is 'token'.") + utilities: Optional[Dict[str, Any]] = Field(default=None, description="ClusterUtilities metadata (service endpoints).") + __properties: ClassVar[List[str]] = ["name", "org_id", "connection_type", "server_url", "ca_bundle", "token", "utilities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if server_url (nullable) is None + # and model_fields_set contains the field + if self.server_url is None and "server_url" in self.model_fields_set: + _dict['server_url'] = None + + # set to None if ca_bundle (nullable) is None + # and model_fields_set contains the field + if self.ca_bundle is None and "ca_bundle" in self.model_fields_set: + _dict['ca_bundle'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + # set to None if utilities (nullable) is None + # and model_fields_set contains the field + if self.utilities is None and "utilities" in self.model_fields_set: + _dict['utilities'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "org_id": obj.get("org_id"), + "connection_type": obj.get("connection_type"), + "server_url": obj.get("server_url"), + "ca_bundle": obj.get("ca_bundle"), + "token": obj.get("token"), + "utilities": obj.get("utilities") + }) + return _obj + + diff --git a/saturn_api/models/cluster_list.py b/saturn_api/models/cluster_list.py new file mode 100644 index 0000000..e07f2c9 --- /dev/null +++ b/saturn_api/models/cluster_list.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from saturn_api.models.cluster import Cluster +from typing import Literal, Optional, Set +from typing_extensions import Self + +class ClusterList(BaseModel): + """ + ClusterList + """ # noqa: E501 + clusters: List[Cluster] = Field(description="List of clusters.") + prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") + next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") + __properties: ClassVar[List[str]] = ["clusters", "prev_key", "next_key"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "clusters", + "prev_key", + "next_key", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in clusters (list) + _items = [] + if self.clusters: + for _item_clusters in self.clusters: + if _item_clusters: + _items.append(_item_clusters.to_dict()) + _dict['clusters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clusters": [Cluster.from_dict(_item) for _item in obj["clusters"]] if obj.get("clusters") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) + return _obj + + diff --git a/saturn_api/models/cluster_update.py b/saturn_api/models/cluster_update.py new file mode 100644 index 0000000..20fcf76 --- /dev/null +++ b/saturn_api/models/cluster_update.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from saturn_api.models.cluster_connection_type import ClusterConnectionType +from typing import Literal, Optional, Set +from typing_extensions import Self + +class ClusterUpdate(BaseModel): + """ + ClusterUpdate + """ # noqa: E501 + connection_type: Optional[ClusterConnectionType] = None + server_url: Optional[StrictStr] = Field(default=None, description="K8s API server URL.") + ca_bundle: Optional[StrictStr] = Field(default=None, description="Base64-encoded CA bundle.") + token: Optional[StrictStr] = Field(default=None, description="Bearer token.") + utilities: Optional[Dict[str, Any]] = Field(default=None, description="ClusterUtilities metadata.") + __properties: ClassVar[List[str]] = ["connection_type", "server_url", "ca_bundle", "token", "utilities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if server_url (nullable) is None + # and model_fields_set contains the field + if self.server_url is None and "server_url" in self.model_fields_set: + _dict['server_url'] = None + + # set to None if ca_bundle (nullable) is None + # and model_fields_set contains the field + if self.ca_bundle is None and "ca_bundle" in self.model_fields_set: + _dict['ca_bundle'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + # set to None if utilities (nullable) is None + # and model_fields_set contains the field + if self.utilities is None and "utilities" in self.model_fields_set: + _dict['utilities'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "connection_type": obj.get("connection_type"), + "server_url": obj.get("server_url"), + "ca_bundle": obj.get("ca_bundle"), + "token": obj.get("token"), + "utilities": obj.get("utilities") + }) + return _obj + + diff --git a/saturn_api/models/concurrency_policy.py b/saturn_api/models/concurrency_policy.py index e651386..d30b3e7 100644 --- a/saturn_api/models/concurrency_policy.py +++ b/saturn_api/models/concurrency_policy.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class ConcurrencyPolicy(str, Enum): """ allowed enum values """ - ALLOW = "Allow" - FORBID = "Forbid" - REPLACE = "Replace" + ALLOW = 'Allow' + FORBID = 'Forbid' + REPLACE = 'Replace' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ConcurrencyPolicy from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/condition.py b/saturn_api/models/condition.py index 3d6ad6b..e26bedf 100644 --- a/saturn_api/models/condition.py +++ b/saturn_api/models/condition.py @@ -1,47 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class Condition(BaseModel): """ Condition - """ # noqa: E501 - + """ # noqa: E501 type: StrictStr status: StrictStr reason: Optional[StrictStr] message: Optional[StrictStr] last_transition_time: Optional[datetime] last_probe_time: Optional[datetime] - __properties: ClassVar[List[str]] = [ - "type", - "status", - "reason", - "message", - "last_transition_time", - "last_probe_time", - ] + __properties: ClassVar[List[str]] = ["type", "status", "reason", "message", "last_transition_time", "last_probe_time"] model_config = ConfigDict( populate_by_name=True, @@ -49,6 +41,7 @@ class Condition(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,16 +72,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "type", - "status", - "reason", - "message", - "last_transition_time", - "last_probe_time", - ] - ) + excluded_fields: Set[str] = set([ + "type", + "status", + "reason", + "message", + "last_transition_time", + "last_probe_time", + ]) _dict = self.model_dump( by_alias=True, @@ -98,22 +89,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: - _dict["reason"] = None + _dict['reason'] = None # set to None if message (nullable) is None # and model_fields_set contains the field if self.message is None and "message" in self.model_fields_set: - _dict["message"] = None + _dict['message'] = None # set to None if last_transition_time (nullable) is None # and model_fields_set contains the field if self.last_transition_time is None and "last_transition_time" in self.model_fields_set: - _dict["last_transition_time"] = None + _dict['last_transition_time'] = None # set to None if last_probe_time (nullable) is None # and model_fields_set contains the field if self.last_probe_time is None and "last_probe_time" in self.model_fields_set: - _dict["last_probe_time"] = None + _dict['last_probe_time'] = None return _dict @@ -126,14 +117,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type"), - "status": obj.get("status"), - "reason": obj.get("reason"), - "message": obj.get("message"), - "last_transition_time": obj.get("last_transition_time"), - "last_probe_time": obj.get("last_probe_time"), - } - ) + _obj = cls.model_validate({ + "type": obj.get("type"), + "status": obj.get("status"), + "reason": obj.get("reason"), + "message": obj.get("message"), + "last_transition_time": obj.get("last_transition_time"), + "last_probe_time": obj.get("last_probe_time") + }) return _obj + + diff --git a/saturn_api/models/container_runtime_summary.py b/saturn_api/models/container_runtime_summary.py index ff58d51..bebbbd5 100644 --- a/saturn_api/models/container_runtime_summary.py +++ b/saturn_api/models/container_runtime_summary.py @@ -1,44 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - StrictBool, - StrictInt, - StrictStr, - field_validator, -) -from typing_extensions import Self +import json +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.condition import Condition from saturn_api.models.container_status import ContainerStatus from saturn_api.models.restart_policy import RestartPolicy - +from typing import Literal, Optional, Set +from typing_extensions import Self class ContainerRuntimeSummary(BaseModel): """ ContainerRuntimeSummary - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr namespace: StrictStr uid: StrictStr @@ -54,35 +45,17 @@ class ContainerRuntimeSummary(BaseModel): restart_policy: RestartPolicy image_pulled: StrictBool exit_code: Optional[StrictInt] - reason: Literal["Evicted", "OOMKilled"] | None + reason: Literal['Evicted', 'OOMKilled'] | None previous: Optional[ContainerRuntimeSummary] - __properties: ClassVar[List[str]] = [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "status", - "finished_at", - "restart_policy", - "image_pulled", - "exit_code", - "reason", - "previous", - ] - - @field_validator("reason") + __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "finished_at", "restart_policy", "image_pulled", "exit_code", "reason", "previous"] + + @field_validator('reason') def reason_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["Evicted", "OOMKilled"]): + if value not in set(['Evicted', 'OOMKilled']): raise ValueError("must be one of enum values ('Evicted', 'OOMKilled')") return value @@ -92,6 +65,7 @@ def reason_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -131,25 +105,23 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "finished_at", - "image_pulled", - "exit_code", - "reason", - "previous", - ] - ) + excluded_fields: Set[str] = set([ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "finished_at", + "image_pulled", + "exit_code", + "reason", + "previous", + ]) _dict = self.model_dump( by_alias=True, @@ -162,49 +134,49 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict["conditions"] = _items + _dict['conditions'] = _items # override the default output from pydantic by calling `to_dict()` of previous if self.previous: - _dict["previous"] = self.previous.to_dict() + _dict['previous'] = self.previous.to_dict() # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict["controller_uid"] = None + _dict['controller_uid'] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict["controller_kind"] = None + _dict['controller_kind'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict["deleted_at"] = None + _dict['deleted_at'] = None # set to None if finished_at (nullable) is None # and model_fields_set contains the field if self.finished_at is None and "finished_at" in self.model_fields_set: - _dict["finished_at"] = None + _dict['finished_at'] = None # set to None if exit_code (nullable) is None # and model_fields_set contains the field if self.exit_code is None and "exit_code" in self.model_fields_set: - _dict["exit_code"] = None + _dict['exit_code'] = None # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: - _dict["reason"] = None + _dict['reason'] = None # set to None if previous (nullable) is None # and model_fields_set contains the field if self.previous is None and "previous" in self.model_fields_set: - _dict["previous"] = None + _dict['previous'] = None return _dict @@ -217,37 +189,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": ( - [Condition.from_dict(_item) for _item in obj["conditions"]] - if obj.get("conditions") is not None - else None - ), - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "finished_at": obj.get("finished_at"), - "restart_policy": obj.get("restart_policy"), - "image_pulled": obj.get("image_pulled"), - "exit_code": obj.get("exit_code"), - "reason": obj.get("reason"), - "previous": ( - ContainerRuntimeSummary.from_dict(obj["previous"]) - if obj.get("previous") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "finished_at": obj.get("finished_at"), + "restart_policy": obj.get("restart_policy"), + "image_pulled": obj.get("image_pulled"), + "exit_code": obj.get("exit_code"), + "reason": obj.get("reason"), + "previous": ContainerRuntimeSummary.from_dict(obj["previous"]) if obj.get("previous") is not None else None + }) return _obj - # TODO: Rewrite to not use raise_errors ContainerRuntimeSummary.model_rebuild(raise_errors=False) + diff --git a/saturn_api/models/container_status.py b/saturn_api/models/container_status.py index 1af878a..beb31f4 100644 --- a/saturn_api/models/container_status.py +++ b/saturn_api/models/container_status.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,13 +26,15 @@ class ContainerStatus(str, Enum): """ allowed enum values """ - RUNNING = "running" - PENDING = "pending" - WAITING = "waiting" - COMPLETED = "completed" - ERROR = "error" + RUNNING = 'running' + PENDING = 'pending' + WAITING = 'waiting' + COMPLETED = 'completed' + ERROR = 'error' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ContainerStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/cron_schedule.py b/saturn_api/models/cron_schedule.py index 29a8faa..2d25e10 100644 --- a/saturn_api/models/cron_schedule.py +++ b/saturn_api/models/cron_schedule.py @@ -1,43 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set +from typing_extensions import Self class CronSchedule(BaseModel): """ CronSchedule - """ # noqa: E501 - + """ # noqa: E501 schedule: StrictStr = Field(description="Cron schedule for triggering the job.") - concurrency_policy: Literal["Allow", "Forbid", "Replace"] - backoff_limit: Annotated[int, Field(strict=True, ge=0)] = Field( - description="Maximum number of retries for a failed job." - ) - __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy", "backoff_limit"] + concurrency_policy: Literal['Allow', 'Forbid', 'Replace'] + __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy"] - @field_validator("concurrency_policy") + @field_validator('concurrency_policy') def concurrency_policy_validate_enum(cls, value): """Validates the enum""" - if value not in set(["Allow", "Forbid", "Replace"]): + if value not in set(['Allow', 'Forbid', 'Replace']): raise ValueError("must be one of enum values ('Allow', 'Forbid', 'Replace')") return value @@ -47,6 +43,7 @@ def concurrency_policy_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,15 +69,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "schedule", - "concurrency_policy", - "backoff_limit", - ] - ) + excluded_fields: Set[str] = set([ + "schedule", + "concurrency_policy", + ]) _dict = self.model_dump( by_alias=True, @@ -98,11 +91,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy"), - "backoff_limit": obj.get("backoff_limit"), - } - ) + _obj = cls.model_validate({ + "schedule": obj.get("schedule"), + "concurrency_policy": obj.get("concurrency_policy") + }) return _obj + + diff --git a/saturn_api/models/cron_schedule_create.py b/saturn_api/models/cron_schedule_create.py index 67b1088..4ede9a1 100644 --- a/saturn_api/models/cron_schedule_create.py +++ b/saturn_api/models/cron_schedule_create.py @@ -1,40 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.concurrency_policy import ConcurrencyPolicy - +from typing import Literal, Optional, Set +from typing_extensions import Self class CronScheduleCreate(BaseModel): """ CronScheduleCreate - """ # noqa: E501 - + """ # noqa: E501 schedule: StrictStr = Field(description="Cron schedule for triggering the job.") concurrency_policy: Optional[ConcurrencyPolicy] = None - backoff_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=0, description="Maximum number of retries for a failed job." - ) - __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy", "backoff_limit"] + __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy"] model_config = ConfigDict( populate_by_name=True, @@ -42,6 +37,7 @@ class CronScheduleCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,13 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy"), - "backoff_limit": ( - obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 0 - ), - } - ) + _obj = cls.model_validate({ + "schedule": obj.get("schedule"), + "concurrency_policy": obj.get("concurrency_policy") + }) return _obj + + diff --git a/saturn_api/models/cron_schedule_update.py b/saturn_api/models/cron_schedule_update.py index 730fd87..187b1f3 100644 --- a/saturn_api/models/cron_schedule_update.py +++ b/saturn_api/models/cron_schedule_update.py @@ -1,42 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.concurrency_policy import ConcurrencyPolicy - +from typing import Literal, Optional, Set +from typing_extensions import Self class CronScheduleUpdate(BaseModel): """ CronScheduleUpdate - """ # noqa: E501 - - schedule: Optional[StrictStr] = Field( - default=None, description="Cron schedule for triggering the job." - ) + """ # noqa: E501 + schedule: Optional[StrictStr] = Field(default=None, description="Cron schedule for triggering the job.") concurrency_policy: Optional[ConcurrencyPolicy] = None - backoff_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of retries for a failed job." - ) - __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy", "backoff_limit"] + __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy"] model_config = ConfigDict( populate_by_name=True, @@ -44,6 +37,7 @@ class CronScheduleUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,11 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy"), - "backoff_limit": obj.get("backoff_limit"), - } - ) + _obj = cls.model_validate({ + "schedule": obj.get("schedule"), + "concurrency_policy": obj.get("concurrency_policy") + }) return _obj + + diff --git a/saturn_api/models/daily_usage.py b/saturn_api/models/daily_usage.py index caf03b9..bdc7ba7 100644 --- a/saturn_api/models/daily_usage.py +++ b/saturn_api/models/daily_usage.py @@ -1,45 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import date -from typing import Any, ClassVar, Dict, List, Optional, Set, Union +import json +from datetime import date from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Literal, Optional, Set from typing_extensions import Self - class DailyUsage(BaseModel): """ DailyUsage - """ # noqa: E501 - + """ # noqa: E501 hours: Union[StrictFloat, StrictInt] = Field(description="Compute hours used.") dollars: Union[StrictFloat, StrictInt] = Field(description="Dollars spent.") var_date: date = Field(description="Date of the usage record.", alias="date") instance_type: StrictStr = Field(description="Instance type used.") resource_type: StrictStr = Field(description="Resource type used.") - __properties: ClassVar[List[str]] = [ - "hours", - "dollars", - "date", - "instance_type", - "resource_type", - ] + __properties: ClassVar[List[str]] = ["hours", "dollars", "date", "instance_type", "resource_type"] model_config = ConfigDict( populate_by_name=True, @@ -47,6 +40,7 @@ class DailyUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "hours": obj.get("hours"), - "dollars": obj.get("dollars"), - "date": obj.get("date"), - "instance_type": obj.get("instance_type"), - "resource_type": obj.get("resource_type"), - } - ) + _obj = cls.model_validate({ + "hours": obj.get("hours"), + "dollars": obj.get("dollars"), + "date": obj.get("date"), + "instance_type": obj.get("instance_type"), + "resource_type": obj.get("resource_type") + }) return _obj + + diff --git a/saturn_api/models/daily_usage_list.py b/saturn_api/models/daily_usage_list.py index 45a0489..d808f3c 100644 --- a/saturn_api/models/daily_usage_list.py +++ b/saturn_api/models/daily_usage_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.daily_usage import DailyUsage - +from typing import Literal, Optional, Set +from typing_extensions import Self class DailyUsageList(BaseModel): """ DailyUsageList - """ # noqa: E501 - + """ # noqa: E501 usage: List[DailyUsage] = Field(description="List of daily usage records.") __properties: ClassVar[List[str]] = ["usage"] @@ -38,6 +36,7 @@ class DailyUsageList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_usage in self.usage: if _item_usage: _items.append(_item_usage.to_dict()) - _dict["usage"] = _items + _dict['usage'] = _items return _dict @classmethod @@ -87,13 +87,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": ( - [DailyUsage.from_dict(_item) for _item in obj["usage"]] - if obj.get("usage") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "usage": [DailyUsage.from_dict(_item) for _item in obj["usage"]] if obj.get("usage") is not None else None + }) return _obj + + diff --git a/saturn_api/models/dask_cluster.py b/saturn_api/models/dask_cluster.py index a05364b..71bf064 100644 --- a/saturn_api/models/dask_cluster.py +++ b/saturn_api/models/dask_cluster.py @@ -1,115 +1,62 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictInt, - StrictStr, - field_validator, -) -from typing_extensions import Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner import Owner - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskCluster(BaseModel): """ DaskCluster - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the dask cluster.") name: StrictStr = Field(description="Name of the resource the dask cluster is attached to.") - resource_type: Literal["dask"] - tags: Optional[Dict[str, StrictStr]] = Field( - description="Descriptive tags for the dask cluster." - ) + resource_type: Literal['dask'] + tags: Optional[Dict[str, StrictStr]] = Field(description="Descriptive tags for the dask cluster.") worker_size: StrictStr = Field(description="Instance size of the dask workers.") - worker_size_display: StrictStr = Field( - description="Description of the instance size for the workers." - ) + worker_size_display: StrictStr = Field(description="Description of the instance size for the workers.") worker_is_spot: StrictBool = Field(description="Enables spot instances for the dask workers.") scheduler_size: StrictStr = Field(description="Instance size of the dask scheduler.") - scheduler_size_display: StrictStr = Field( - description="Description of the instance size for the scheduler." - ) + scheduler_size_display: StrictStr = Field(description="Description of the instance size for the scheduler.") n_workers: StrictInt = Field(description="Number of dask workers.") nprocs: StrictInt = Field(description="Number of processes per worker.") nthreads: StrictInt = Field(description="Number of threads per process.") scheduler_url: StrictStr = Field(description="Internal address for the dask scheduler") subdomain: StrictStr = Field(description="Subdomain for the dask dashboard.") - image: StrictStr = Field( - description="Image for the dask cluster and resource it is attached to." - ) + image: StrictStr = Field(description="Image for the dask cluster and resource it is attached to.") created_at: StrictStr = Field(description="Creation timestamp.") status: StrictStr = Field(description="Current status of the dask cluster.") - warnings: Optional[List[StrictStr]] = Field( - default=None, description="Messages with warnings about the state of the dask cluster." - ) - errors: Optional[List[StrictStr]] = Field( - default=None, description="Messages with errors about the state of the dask cluster." - ) + warnings: Optional[List[StrictStr]] = Field(default=None, description="Messages with warnings about the state of the dask cluster.") + errors: Optional[List[StrictStr]] = Field(default=None, description="Messages with errors about the state of the dask cluster.") url: StrictStr = Field(description="External URL for the dask dashboard.") owner: Owner = Field(description="Owner of the dask cluster.") - deployment_id: Optional[StrictStr] = Field( - default=None, description="Deployment ID the dask cluster is attached to." - ) - job_id: Optional[StrictStr] = Field( - default=None, description="Job ID the dask cluster is attached to." - ) - workspace_id: Optional[StrictStr] = Field( - default=None, description="Workspace ID the dask cluster is attached to." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "resource_type", - "tags", - "worker_size", - "worker_size_display", - "worker_is_spot", - "scheduler_size", - "scheduler_size_display", - "n_workers", - "nprocs", - "nthreads", - "scheduler_url", - "subdomain", - "image", - "created_at", - "status", - "warnings", - "errors", - "url", - "owner", - "deployment_id", - "job_id", - "workspace_id", - ] + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID the dask cluster is attached to.") + job_id: Optional[StrictStr] = Field(default=None, description="Job ID the dask cluster is attached to.") + workspace_id: Optional[StrictStr] = Field(default=None, description="Workspace ID the dask cluster is attached to.") + __properties: ClassVar[List[str]] = ["id", "name", "resource_type", "tags", "worker_size", "worker_size_display", "worker_is_spot", "scheduler_size", "scheduler_size_display", "n_workers", "nprocs", "nthreads", "scheduler_url", "subdomain", "image", "created_at", "status", "warnings", "errors", "url", "owner", "deployment_id", "job_id", "workspace_id"] - @field_validator("resource_type") + @field_validator('resource_type') def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["dask"]): + if value not in set(['dask']): raise ValueError("must be one of enum values ('dask')") return value @@ -119,6 +66,7 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -165,32 +113,30 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "resource_type", - "tags", - "worker_size", - "worker_size_display", - "worker_is_spot", - "scheduler_size", - "scheduler_size_display", - "n_workers", - "nprocs", - "nthreads", - "scheduler_url", - "subdomain", - "image", - "created_at", - "status", - "url", - "owner", - "deployment_id", - "job_id", - "workspace_id", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "resource_type", + "tags", + "worker_size", + "worker_size_display", + "worker_is_spot", + "scheduler_size", + "scheduler_size_display", + "n_workers", + "nprocs", + "nthreads", + "scheduler_url", + "subdomain", + "image", + "created_at", + "status", + "url", + "owner", + "deployment_id", + "job_id", + "workspace_id", + ]) _dict = self.model_dump( by_alias=True, @@ -199,26 +145,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if deployment_id (nullable) is None # and model_fields_set contains the field if self.deployment_id is None and "deployment_id" in self.model_fields_set: - _dict["deployment_id"] = None + _dict['deployment_id'] = None # set to None if job_id (nullable) is None # and model_fields_set contains the field if self.job_id is None and "job_id" in self.model_fields_set: - _dict["job_id"] = None + _dict['job_id'] = None # set to None if workspace_id (nullable) is None # and model_fields_set contains the field if self.workspace_id is None and "workspace_id" in self.model_fields_set: - _dict["workspace_id"] = None + _dict['workspace_id'] = None return _dict @@ -231,32 +177,32 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "resource_type": obj.get("resource_type"), - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_size_display": obj.get("worker_size_display"), - "worker_is_spot": obj.get("worker_is_spot"), - "scheduler_size": obj.get("scheduler_size"), - "scheduler_size_display": obj.get("scheduler_size_display"), - "n_workers": obj.get("n_workers"), - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads"), - "scheduler_url": obj.get("scheduler_url"), - "subdomain": obj.get("subdomain"), - "image": obj.get("image"), - "created_at": obj.get("created_at"), - "status": obj.get("status"), - "warnings": obj.get("warnings"), - "errors": obj.get("errors"), - "url": obj.get("url"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "deployment_id": obj.get("deployment_id"), - "job_id": obj.get("job_id"), - "workspace_id": obj.get("workspace_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_size_display": obj.get("worker_size_display"), + "worker_is_spot": obj.get("worker_is_spot"), + "scheduler_size": obj.get("scheduler_size"), + "scheduler_size_display": obj.get("scheduler_size_display"), + "n_workers": obj.get("n_workers"), + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads"), + "scheduler_url": obj.get("scheduler_url"), + "subdomain": obj.get("subdomain"), + "image": obj.get("image"), + "created_at": obj.get("created_at"), + "status": obj.get("status"), + "warnings": obj.get("warnings"), + "errors": obj.get("errors"), + "url": obj.get("url"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "deployment_id": obj.get("deployment_id"), + "job_id": obj.get("job_id"), + "workspace_id": obj.get("workspace_id") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_adapt.py b/saturn_api/models/dask_cluster_adapt.py index 6f200f0..1d4163c 100644 --- a/saturn_api/models/dask_cluster_adapt.py +++ b/saturn_api/models/dask_cluster_adapt.py @@ -1,38 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterAdapt(BaseModel): """ DaskClusterAdapt - """ # noqa: E501 - - minimum: Annotated[int, Field(strict=True, ge=0)] = Field( - description="Minimum number of dask workers for adaptive scaling." - ) - maximum: Annotated[int, Field(strict=True, ge=0)] = Field( - description="Maximum number of dask workers for adaptive scaling." - ) + """ # noqa: E501 + minimum: Annotated[int, Field(strict=True, ge=0)] = Field(description="Minimum number of dask workers for adaptive scaling.") + maximum: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of dask workers for adaptive scaling.") __properties: ClassVar[List[str]] = ["minimum", "maximum"] model_config = ConfigDict( @@ -41,6 +37,7 @@ class DaskClusterAdapt(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"minimum": obj.get("minimum"), "maximum": obj.get("maximum")}) + _obj = cls.model_validate({ + "minimum": obj.get("minimum"), + "maximum": obj.get("maximum") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_attachment.py b/saturn_api/models/dask_cluster_attachment.py index 32e44f8..7014d5c 100644 --- a/saturn_api/models/dask_cluster_attachment.py +++ b/saturn_api/models/dask_cluster_attachment.py @@ -1,50 +1,47 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Annotated, Self - -from saturn_api.models.dask_cluster_attachment_scheduler import ( - DaskClusterAttachmentScheduler, -) +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from saturn_api.models.dask_cluster_attachment_scheduler import DaskClusterAttachmentScheduler from saturn_api.models.dask_cluster_attachment_worker import DaskClusterAttachmentWorker - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterAttachment(BaseModel): """ DaskClusterAttachment - """ # noqa: E501 - + """ # noqa: E501 num_workers: Annotated[int, Field(strict=True, ge=0)] scheduler: DaskClusterAttachmentScheduler worker: DaskClusterAttachmentWorker - status: Literal["stopped", "running"] | None = None + status: Literal['stopped', 'running'] | None = None __properties: ClassVar[List[str]] = ["num_workers", "scheduler", "worker", "status"] - @field_validator("status") + @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["stopped", "running"]): + if value not in set(['stopped', 'running']): raise ValueError("must be one of enum values ('stopped', 'running')") return value @@ -54,6 +51,7 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,14 +86,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of scheduler if self.scheduler: - _dict["scheduler"] = self.scheduler.to_dict() + _dict['scheduler'] = self.scheduler.to_dict() # override the default output from pydantic by calling `to_dict()` of worker if self.worker: - _dict["worker"] = self.worker.to_dict() + _dict['worker'] = self.worker.to_dict() # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict["status"] = None + _dict['status'] = None return _dict @@ -107,20 +106,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "num_workers": obj.get("num_workers"), - "scheduler": ( - DaskClusterAttachmentScheduler.from_dict(obj["scheduler"]) - if obj.get("scheduler") is not None - else None - ), - "worker": ( - DaskClusterAttachmentWorker.from_dict(obj["worker"]) - if obj.get("worker") is not None - else None - ), - "status": obj.get("status"), - } - ) + _obj = cls.model_validate({ + "num_workers": obj.get("num_workers"), + "scheduler": DaskClusterAttachmentScheduler.from_dict(obj["scheduler"]) if obj.get("scheduler") is not None else None, + "worker": DaskClusterAttachmentWorker.from_dict(obj["worker"]) if obj.get("worker") is not None else None, + "status": obj.get("status") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_attachment_scheduler.py b/saturn_api/models/dask_cluster_attachment_scheduler.py index d2fb195..de4999b 100644 --- a/saturn_api/models/dask_cluster_attachment_scheduler.py +++ b/saturn_api/models/dask_cluster_attachment_scheduler.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class DaskClusterAttachmentScheduler(BaseModel): """ DaskClusterAttachmentScheduler - """ # noqa: E501 - + """ # noqa: E501 instance_type: StrictStr __properties: ClassVar[List[str]] = ["instance_type"] @@ -36,6 +35,7 @@ class DaskClusterAttachmentScheduler(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"instance_type": obj.get("instance_type")}) + _obj = cls.model_validate({ + "instance_type": obj.get("instance_type") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_attachment_worker.py b/saturn_api/models/dask_cluster_attachment_worker.py index d73e4e4..e29d0c9 100644 --- a/saturn_api/models/dask_cluster_attachment_worker.py +++ b/saturn_api/models/dask_cluster_attachment_worker.py @@ -1,42 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class DaskClusterAttachmentWorker(BaseModel): """ DaskClusterAttachmentWorker - """ # noqa: E501 - + """ # noqa: E501 instance_type: StrictStr num_processes: Optional[StrictInt] = None num_threads: Optional[StrictInt] = None use_spot_instances: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = [ - "instance_type", - "num_processes", - "num_threads", - "use_spot_instances", - ] + __properties: ClassVar[List[str]] = ["instance_type", "num_processes", "num_threads", "use_spot_instances"] model_config = ConfigDict( populate_by_name=True, @@ -44,6 +38,7 @@ class DaskClusterAttachmentWorker(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,16 +82,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_type": obj.get("instance_type"), - "num_processes": obj.get("num_processes"), - "num_threads": obj.get("num_threads"), - "use_spot_instances": ( - obj.get("use_spot_instances") - if obj.get("use_spot_instances") is not None - else False - ), - } - ) + _obj = cls.model_validate({ + "instance_type": obj.get("instance_type"), + "num_processes": obj.get("num_processes"), + "num_threads": obj.get("num_threads"), + "use_spot_instances": obj.get("use_spot_instances") if obj.get("use_spot_instances") is not None else False + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_create.py b/saturn_api/models/dask_cluster_create.py index d7977c1..1a0c47d 100644 --- a/saturn_api/models/dask_cluster_create.py +++ b/saturn_api/models/dask_cluster_create.py @@ -1,66 +1,42 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.resource_reference import ResourceReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterCreate(BaseModel): """ DaskClusterCreate - """ # noqa: E501 - - resource: ResourceReference = Field( - description="Reference to the resource to attach the dask cluster to." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the dask cluster." - ) - worker_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the dask workers." - ) - worker_is_spot: Optional[StrictBool] = Field( - default=False, description="Enables spot instances for the dask workers." - ) - scheduler_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the dask scheduler." - ) + """ # noqa: E501 + resource: ResourceReference = Field(description="Reference to the resource to attach the dask cluster to.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the dask cluster.") + worker_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask workers.") + worker_is_spot: Optional[StrictBool] = Field(default=False, description="Enables spot instances for the dask workers.") + scheduler_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask scheduler.") n_workers: Optional[StrictInt] = Field(default=1, description="Number of dask workers.") nprocs: Optional[StrictInt] = Field(default=None, description="Number of processes per worker.") nthreads: Optional[StrictInt] = Field(default=2, description="Number of threads per process.") - subdomain: Optional[StrictStr] = Field( - default=None, description="Subdomain for the dask dashboard." - ) - __properties: ClassVar[List[str]] = [ - "resource", - "tags", - "worker_size", - "worker_is_spot", - "scheduler_size", - "n_workers", - "nprocs", - "nthreads", - "subdomain", - ] + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the dask dashboard.") + __properties: ClassVar[List[str]] = ["resource", "tags", "worker_size", "worker_is_spot", "scheduler_size", "n_workers", "nprocs", "nthreads", "subdomain"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +44,7 @@ class DaskClusterCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,16 +79,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of resource if self.resource: - _dict["resource"] = self.resource.to_dict() + _dict['resource'] = self.resource.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict["subdomain"] = None + _dict['subdomain'] = None return _dict @@ -123,23 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "resource": ( - ResourceReference.from_dict(obj["resource"]) - if obj.get("resource") is not None - else None - ), - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_is_spot": ( - obj.get("worker_is_spot") if obj.get("worker_is_spot") is not None else False - ), - "scheduler_size": obj.get("scheduler_size"), - "n_workers": obj.get("n_workers") if obj.get("n_workers") is not None else 1, - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads") if obj.get("nthreads") is not None else 2, - "subdomain": obj.get("subdomain"), - } - ) + _obj = cls.model_validate({ + "resource": ResourceReference.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_is_spot": obj.get("worker_is_spot") if obj.get("worker_is_spot") is not None else False, + "scheduler_size": obj.get("scheduler_size"), + "n_workers": obj.get("n_workers") if obj.get("n_workers") is not None else 1, + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads") if obj.get("nthreads") is not None else 2, + "subdomain": obj.get("subdomain") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_list.py b/saturn_api/models/dask_cluster_list.py index c1dba5d..5bb873c 100644 --- a/saturn_api/models/dask_cluster_list.py +++ b/saturn_api/models/dask_cluster_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.dask_cluster import DaskCluster - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterList(BaseModel): """ DaskClusterList - """ # noqa: E501 - + """ # noqa: E501 dask_clusters: List[DaskCluster] = Field(description="List of dask clusters.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class DaskClusterList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "dask_clusters", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "dask_clusters", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_dask_clusters in self.dask_clusters: if _item_dask_clusters: _items.append(_item_dask_clusters.to_dict()) - _dict["dask_clusters"] = _items + _dict['dask_clusters'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "dask_clusters": ( - [DaskCluster.from_dict(_item) for _item in obj["dask_clusters"]] - if obj.get("dask_clusters") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "dask_clusters": [DaskCluster.from_dict(_item) for _item in obj["dask_clusters"]] if obj.get("dask_clusters") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_nested.py b/saturn_api/models/dask_cluster_nested.py index d5bb4dd..ef7953b 100644 --- a/saturn_api/models/dask_cluster_nested.py +++ b/saturn_api/models/dask_cluster_nested.py @@ -1,99 +1,57 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictInt, - StrictStr, - field_validator, -) -from typing_extensions import Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterNested(BaseModel): """ DaskClusterNested - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the dask cluster.") name: StrictStr = Field(description="Name of the resource the dask cluster is attached to.") - resource_type: Literal["dask"] - tags: Optional[Dict[str, StrictStr]] = Field( - description="Descriptive tags for the dask cluster." - ) + resource_type: Literal['dask'] + tags: Optional[Dict[str, StrictStr]] = Field(description="Descriptive tags for the dask cluster.") worker_size: StrictStr = Field(description="Instance size of the dask workers.") - worker_size_display: StrictStr = Field( - description="Description of the instance size for the workers." - ) + worker_size_display: StrictStr = Field(description="Description of the instance size for the workers.") worker_is_spot: StrictBool = Field(description="Enables spot instances for the dask workers.") scheduler_size: StrictStr = Field(description="Instance size of the dask scheduler.") - scheduler_size_display: StrictStr = Field( - description="Description of the instance size for the scheduler." - ) + scheduler_size_display: StrictStr = Field(description="Description of the instance size for the scheduler.") n_workers: StrictInt = Field(description="Number of dask workers.") nprocs: StrictInt = Field(description="Number of processes per worker.") nthreads: StrictInt = Field(description="Number of threads per process.") scheduler_url: StrictStr = Field(description="Internal address for the dask scheduler") subdomain: StrictStr = Field(description="Subdomain for the dask dashboard.") - image: StrictStr = Field( - description="Image for the dask cluster and resource it is attached to." - ) + image: StrictStr = Field(description="Image for the dask cluster and resource it is attached to.") created_at: StrictStr = Field(description="Creation timestamp.") status: StrictStr = Field(description="Current status of the dask cluster.") - warnings: Optional[List[StrictStr]] = Field( - default=None, description="Messages with warnings about the state of the dask cluster." - ) - errors: Optional[List[StrictStr]] = Field( - default=None, description="Messages with errors about the state of the dask cluster." - ) + warnings: Optional[List[StrictStr]] = Field(default=None, description="Messages with warnings about the state of the dask cluster.") + errors: Optional[List[StrictStr]] = Field(default=None, description="Messages with errors about the state of the dask cluster.") url: StrictStr = Field(description="External URL for the dask dashboard.") - __properties: ClassVar[List[str]] = [ - "id", - "name", - "resource_type", - "tags", - "worker_size", - "worker_size_display", - "worker_is_spot", - "scheduler_size", - "scheduler_size_display", - "n_workers", - "nprocs", - "nthreads", - "scheduler_url", - "subdomain", - "image", - "created_at", - "status", - "warnings", - "errors", - "url", - ] - - @field_validator("resource_type") + __properties: ClassVar[List[str]] = ["id", "name", "resource_type", "tags", "worker_size", "worker_size_display", "worker_is_spot", "scheduler_size", "scheduler_size_display", "n_workers", "nprocs", "nthreads", "scheduler_url", "subdomain", "image", "created_at", "status", "warnings", "errors", "url"] + + @field_validator('resource_type') def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["dask"]): + if value not in set(['dask']): raise ValueError("must be one of enum values ('dask')") return value @@ -103,6 +61,7 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -145,28 +104,26 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "resource_type", - "tags", - "worker_size", - "worker_size_display", - "worker_is_spot", - "scheduler_size", - "scheduler_size_display", - "n_workers", - "nprocs", - "nthreads", - "scheduler_url", - "subdomain", - "image", - "created_at", - "status", - "url", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "resource_type", + "tags", + "worker_size", + "worker_size_display", + "worker_is_spot", + "scheduler_size", + "scheduler_size_display", + "n_workers", + "nprocs", + "nthreads", + "scheduler_url", + "subdomain", + "image", + "created_at", + "status", + "url", + ]) _dict = self.model_dump( by_alias=True, @@ -176,7 +133,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None return _dict @@ -189,28 +146,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "resource_type": obj.get("resource_type"), - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_size_display": obj.get("worker_size_display"), - "worker_is_spot": obj.get("worker_is_spot"), - "scheduler_size": obj.get("scheduler_size"), - "scheduler_size_display": obj.get("scheduler_size_display"), - "n_workers": obj.get("n_workers"), - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads"), - "scheduler_url": obj.get("scheduler_url"), - "subdomain": obj.get("subdomain"), - "image": obj.get("image"), - "created_at": obj.get("created_at"), - "status": obj.get("status"), - "warnings": obj.get("warnings"), - "errors": obj.get("errors"), - "url": obj.get("url"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_size_display": obj.get("worker_size_display"), + "worker_is_spot": obj.get("worker_is_spot"), + "scheduler_size": obj.get("scheduler_size"), + "scheduler_size_display": obj.get("scheduler_size_display"), + "n_workers": obj.get("n_workers"), + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads"), + "scheduler_url": obj.get("scheduler_url"), + "subdomain": obj.get("subdomain"), + "image": obj.get("image"), + "created_at": obj.get("created_at"), + "status": obj.get("status"), + "warnings": obj.get("warnings"), + "errors": obj.get("errors"), + "url": obj.get("url") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_runtime_summary.py b/saturn_api/models/dask_cluster_runtime_summary.py index 86190d9..56f6e03 100644 --- a/saturn_api/models/dask_cluster_runtime_summary.py +++ b/saturn_api/models/dask_cluster_runtime_summary.py @@ -1,39 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.condition import Condition from saturn_api.models.dask_worker_summary import DaskWorkerSummary from saturn_api.models.deployment_runtime_summary import DeploymentRuntimeSummary from saturn_api.models.pod_runtime_summary import PodRuntimeSummary from saturn_api.models.pod_status import PodStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterRuntimeSummary(BaseModel): """ DaskClusterRuntimeSummary - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr namespace: StrictStr uid: StrictStr @@ -49,23 +47,7 @@ class DaskClusterRuntimeSummary(BaseModel): scheduler_summary: PodRuntimeSummary worker_summary: DaskWorkerSummary errors: List[StrictStr] - __properties: ClassVar[List[str]] = [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "status", - "kubecluster_summary", - "scheduler_summary", - "worker_summary", - "errors", - ] + __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "kubecluster_summary", "scheduler_summary", "worker_summary", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +55,7 @@ class DaskClusterRuntimeSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -111,24 +94,22 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "kubecluster_summary", - "scheduler_summary", - "worker_summary", - "errors", - ] - ) + excluded_fields: Set[str] = set([ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "kubecluster_summary", + "scheduler_summary", + "worker_summary", + "errors", + ]) _dict = self.model_dump( by_alias=True, @@ -141,35 +122,35 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict["conditions"] = _items + _dict['conditions'] = _items # override the default output from pydantic by calling `to_dict()` of kubecluster_summary if self.kubecluster_summary: - _dict["kubecluster_summary"] = self.kubecluster_summary.to_dict() + _dict['kubecluster_summary'] = self.kubecluster_summary.to_dict() # override the default output from pydantic by calling `to_dict()` of scheduler_summary if self.scheduler_summary: - _dict["scheduler_summary"] = self.scheduler_summary.to_dict() + _dict['scheduler_summary'] = self.scheduler_summary.to_dict() # override the default output from pydantic by calling `to_dict()` of worker_summary if self.worker_summary: - _dict["worker_summary"] = self.worker_summary.to_dict() + _dict['worker_summary'] = self.worker_summary.to_dict() # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict["controller_uid"] = None + _dict['controller_uid'] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict["controller_kind"] = None + _dict['controller_kind'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict["deleted_at"] = None + _dict['deleted_at'] = None return _dict @@ -182,39 +163,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": ( - [Condition.from_dict(_item) for _item in obj["conditions"]] - if obj.get("conditions") is not None - else None - ), - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "kubecluster_summary": ( - DeploymentRuntimeSummary.from_dict(obj["kubecluster_summary"]) - if obj.get("kubecluster_summary") is not None - else None - ), - "scheduler_summary": ( - PodRuntimeSummary.from_dict(obj["scheduler_summary"]) - if obj.get("scheduler_summary") is not None - else None - ), - "worker_summary": ( - DaskWorkerSummary.from_dict(obj["worker_summary"]) - if obj.get("worker_summary") is not None - else None - ), - "errors": obj.get("errors"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "kubecluster_summary": DeploymentRuntimeSummary.from_dict(obj["kubecluster_summary"]) if obj.get("kubecluster_summary") is not None else None, + "scheduler_summary": PodRuntimeSummary.from_dict(obj["scheduler_summary"]) if obj.get("scheduler_summary") is not None else None, + "worker_summary": DaskWorkerSummary.from_dict(obj["worker_summary"]) if obj.get("worker_summary") is not None else None, + "errors": obj.get("errors") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_scale.py b/saturn_api/models/dask_cluster_scale.py index 02589b8..644ac71 100644 --- a/saturn_api/models/dask_cluster_scale.py +++ b/saturn_api/models/dask_cluster_scale.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterScale(BaseModel): """ DaskClusterScale - """ # noqa: E501 - - n: Annotated[int, Field(strict=True, ge=0)] = Field( - description="Number of dask workers to scale to." - ) + """ # noqa: E501 + n: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of dask workers to scale to.") __properties: ClassVar[List[str]] = ["n"] model_config = ConfigDict( @@ -38,6 +36,7 @@ class DaskClusterScale(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"n": obj.get("n")}) + _obj = cls.model_validate({ + "n": obj.get("n") + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_server_options.py b/saturn_api/models/dask_cluster_server_options.py index 6e9992c..5b9480f 100644 --- a/saturn_api/models/dask_cluster_server_options.py +++ b/saturn_api/models/dask_cluster_server_options.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.server_options_size import ServerOptionsSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskClusterServerOptions(BaseModel): """ DaskClusterServerOptions - """ # noqa: E501 - - server_options: ServerOptionsSize = Field( - description="Configuration options for dask clusters." - ) + """ # noqa: E501 + server_options: ServerOptionsSize = Field(description="Configuration options for dask clusters.") __properties: ClassVar[List[str]] = ["server_options"] model_config = ConfigDict( @@ -40,6 +36,7 @@ class DaskClusterServerOptions(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict["server_options"] = self.server_options.to_dict() + _dict['server_options'] = self.server_options.to_dict() return _dict @classmethod @@ -85,13 +83,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "server_options": ( - ServerOptionsSize.from_dict(obj["server_options"]) - if obj.get("server_options") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "server_options": ServerOptionsSize.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None + }) return _obj + + diff --git a/saturn_api/models/dask_cluster_update.py b/saturn_api/models/dask_cluster_update.py index d7b336e..13e1ae2 100644 --- a/saturn_api/models/dask_cluster_update.py +++ b/saturn_api/models/dask_cluster_update.py @@ -1,62 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class DaskClusterUpdate(BaseModel): """ DaskClusterUpdate - """ # noqa: E501 - - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the dask cluster." - ) - worker_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the dask workers." - ) - worker_is_spot: Optional[StrictBool] = Field( - default=None, description="Enables spot instances for the dask workers." - ) - scheduler_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the dask scheduler." - ) + """ # noqa: E501 + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the dask cluster.") + worker_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask workers.") + worker_is_spot: Optional[StrictBool] = Field(default=None, description="Enables spot instances for the dask workers.") + scheduler_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask scheduler.") n_workers: Optional[StrictInt] = Field(default=None, description="Number of dask workers.") nprocs: Optional[StrictInt] = Field(default=None, description="Number of processes per worker.") - nthreads: Optional[StrictInt] = Field( - default=None, description="Number of threads per process." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="Subdomain for the dask dashboard." - ) - __properties: ClassVar[List[str]] = [ - "tags", - "worker_size", - "worker_is_spot", - "scheduler_size", - "n_workers", - "nprocs", - "nthreads", - "subdomain", - ] + nthreads: Optional[StrictInt] = Field(default=None, description="Number of threads per process.") + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the dask dashboard.") + __properties: ClassVar[List[str]] = ["tags", "worker_size", "worker_is_spot", "scheduler_size", "n_workers", "nprocs", "nthreads", "subdomain"] model_config = ConfigDict( populate_by_name=True, @@ -64,6 +42,7 @@ class DaskClusterUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -88,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -98,12 +78,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict["subdomain"] = None + _dict['subdomain'] = None return _dict @@ -116,16 +96,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_is_spot": obj.get("worker_is_spot"), - "scheduler_size": obj.get("scheduler_size"), - "n_workers": obj.get("n_workers"), - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads"), - "subdomain": obj.get("subdomain"), - } - ) + _obj = cls.model_validate({ + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_is_spot": obj.get("worker_is_spot"), + "scheduler_size": obj.get("scheduler_size"), + "n_workers": obj.get("n_workers"), + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads"), + "subdomain": obj.get("subdomain") + }) return _obj + + diff --git a/saturn_api/models/dask_components.py b/saturn_api/models/dask_components.py index 9bab600..cf43eea 100644 --- a/saturn_api/models/dask_components.py +++ b/saturn_api/models/dask_components.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class DaskComponents(str, Enum): """ allowed enum values """ - KUBECLUSTER = "kubecluster" - SCHEDULER = "scheduler" - WORKER = "worker" + KUBECLUSTER = 'kubecluster' + SCHEDULER = 'scheduler' + WORKER = 'worker' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DaskComponents from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/dask_worker_runtime_summary_list.py b/saturn_api/models/dask_worker_runtime_summary_list.py index fc04da4..5216e2e 100644 --- a/saturn_api/models/dask_worker_runtime_summary_list.py +++ b/saturn_api/models/dask_worker_runtime_summary_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.pod_runtime_summary import PodRuntimeSummary - +from typing import Literal, Optional, Set +from typing_extensions import Self class DaskWorkerRuntimeSummaryList(BaseModel): """ DaskWorkerRuntimeSummaryList - """ # noqa: E501 - + """ # noqa: E501 workers: List[PodRuntimeSummary] = Field(description="List of worker pod runtime summaries.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class DaskWorkerRuntimeSummaryList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "workers", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "workers", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_workers in self.workers: if _item_workers: _items.append(_item_workers.to_dict()) - _dict["workers"] = _items + _dict['workers'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "workers": ( - [PodRuntimeSummary.from_dict(_item) for _item in obj["workers"]] - if obj.get("workers") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "workers": [PodRuntimeSummary.from_dict(_item) for _item in obj["workers"]] if obj.get("workers") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/dask_worker_summary.py b/saturn_api/models/dask_worker_summary.py index 672da17..31e3ade 100644 --- a/saturn_api/models/dask_worker_summary.py +++ b/saturn_api/models/dask_worker_summary.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class DaskWorkerSummary(BaseModel): """ DaskWorkerSummary - """ # noqa: E501 - + """ # noqa: E501 count: StrictInt pending_count: StrictInt running_count: StrictInt @@ -39,6 +38,7 @@ class DaskWorkerSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,14 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "count", - "pending_count", - "running_count", - "error_count", - ] - ) + excluded_fields: Set[str] = set([ + "count", + "pending_count", + "running_count", + "error_count", + ]) _dict = self.model_dump( by_alias=True, @@ -92,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "count": obj.get("count"), - "pending_count": obj.get("pending_count"), - "running_count": obj.get("running_count"), - "error_count": obj.get("error_count"), - } - ) + _obj = cls.model_validate({ + "count": obj.get("count"), + "pending_count": obj.get("pending_count"), + "running_count": obj.get("running_count"), + "error_count": obj.get("error_count") + }) return _obj + + diff --git a/saturn_api/models/data_point.py b/saturn_api/models/data_point.py index 4add661..e1afaaf 100644 --- a/saturn_api/models/data_point.py +++ b/saturn_api/models/data_point.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set, Union +import json from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Literal, Optional, Set from typing_extensions import Self - class DataPoint(BaseModel): """ DataPoint - """ # noqa: E501 - + """ # noqa: E501 datetime: StrictStr = Field(description="Metric timestamp.") value: Union[StrictFloat, StrictInt] = Field(description="Value of the data point.") __properties: ClassVar[List[str]] = ["datetime", "value"] @@ -37,6 +36,7 @@ class DataPoint(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,12 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "datetime", - "value", - ] - ) + excluded_fields: Set[str] = set([ + "datetime", + "value", + ]) _dict = self.model_dump( by_alias=True, @@ -86,5 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"datetime": obj.get("datetime"), "value": obj.get("value")}) + _obj = cls.model_validate({ + "datetime": obj.get("datetime"), + "value": obj.get("value") + }) return _obj + + diff --git a/saturn_api/models/default_images.py b/saturn_api/models/default_images.py index 3421599..60f2b2c 100644 --- a/saturn_api/models/default_images.py +++ b/saturn_api/models/default_images.py @@ -1,43 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.image_tag import ImageTag - +from typing import Literal, Optional, Set +from typing_extensions import Self class DefaultImages(BaseModel): """ DefaultImages - """ # noqa: E501 - - cpu: Optional[ImageTag] = Field( - default=None, description="Default image tag for CPU instances.", alias="CPU" - ) - nvidia: Optional[ImageTag] = Field( - default=None, description="Default image tag for NVIDIA GPU instances.", alias="NVIDIA" - ) - amd: Optional[ImageTag] = Field( - default=None, description="Default image tag for AMD GPU instances.", alias="AMD" - ) + """ # noqa: E501 + cpu: Optional[ImageTag] = Field(default=None, description="Default image tag for CPU instances.", alias="CPU") + nvidia: Optional[ImageTag] = Field(default=None, description="Default image tag for NVIDIA GPU instances.", alias="NVIDIA") + amd: Optional[ImageTag] = Field(default=None, description="Default image tag for AMD GPU instances.", alias="AMD") __properties: ClassVar[List[str]] = ["CPU", "NVIDIA", "AMD"] model_config = ConfigDict( @@ -46,6 +38,7 @@ class DefaultImages(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,13 +73,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of cpu if self.cpu: - _dict["CPU"] = self.cpu.to_dict() + _dict['CPU'] = self.cpu.to_dict() # override the default output from pydantic by calling `to_dict()` of nvidia if self.nvidia: - _dict["NVIDIA"] = self.nvidia.to_dict() + _dict['NVIDIA'] = self.nvidia.to_dict() # override the default output from pydantic by calling `to_dict()` of amd if self.amd: - _dict["AMD"] = self.amd.to_dict() + _dict['AMD'] = self.amd.to_dict() return _dict @classmethod @@ -97,13 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "CPU": ImageTag.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, - "NVIDIA": ( - ImageTag.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None - ), - "AMD": ImageTag.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None, - } - ) + _obj = cls.model_validate({ + "CPU": ImageTag.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, + "NVIDIA": ImageTag.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None, + "AMD": ImageTag.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None + }) return _obj + + diff --git a/saturn_api/models/default_sizes.py b/saturn_api/models/default_sizes.py index 742b028..6543648 100644 --- a/saturn_api/models/default_sizes.py +++ b/saturn_api/models/default_sizes.py @@ -1,43 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.instance_size import InstanceSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class DefaultSizes(BaseModel): """ DefaultSizes - """ # noqa: E501 - - cpu: Optional[InstanceSize] = Field( - default=None, description="Default CPU instance size.", alias="CPU" - ) - nvidia: Optional[InstanceSize] = Field( - default=None, description="Default NVIDIA GPU instance size.", alias="NVIDIA" - ) - amd: Optional[InstanceSize] = Field( - default=None, description="Default AMD GPU instance size.", alias="AMD" - ) + """ # noqa: E501 + cpu: Optional[InstanceSize] = Field(default=None, description="Default CPU instance size.", alias="CPU") + nvidia: Optional[InstanceSize] = Field(default=None, description="Default NVIDIA GPU instance size.", alias="NVIDIA") + amd: Optional[InstanceSize] = Field(default=None, description="Default AMD GPU instance size.", alias="AMD") __properties: ClassVar[List[str]] = ["CPU", "NVIDIA", "AMD"] model_config = ConfigDict( @@ -46,6 +38,7 @@ class DefaultSizes(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,13 +73,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of cpu if self.cpu: - _dict["CPU"] = self.cpu.to_dict() + _dict['CPU'] = self.cpu.to_dict() # override the default output from pydantic by calling `to_dict()` of nvidia if self.nvidia: - _dict["NVIDIA"] = self.nvidia.to_dict() + _dict['NVIDIA'] = self.nvidia.to_dict() # override the default output from pydantic by calling `to_dict()` of amd if self.amd: - _dict["AMD"] = self.amd.to_dict() + _dict['AMD'] = self.amd.to_dict() return _dict @classmethod @@ -97,13 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "CPU": InstanceSize.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, - "NVIDIA": ( - InstanceSize.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None - ), - "AMD": InstanceSize.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None, - } - ) + _obj = cls.model_validate({ + "CPU": InstanceSize.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, + "NVIDIA": InstanceSize.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None, + "AMD": InstanceSize.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None + }) return _obj + + diff --git a/saturn_api/models/deployment.py b/saturn_api/models/deployment.py index b8001b2..f811690 100644 --- a/saturn_api/models/deployment.py +++ b/saturn_api/models/deployment.py @@ -1,130 +1,72 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictInt, - StrictStr, - field_validator, -) -from typing_extensions import Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.dask_cluster_nested import DaskClusterNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.image_tag import ImageTag from saturn_api.models.owner import Owner - +from typing import Literal, Optional, Set +from typing_extensions import Self class Deployment(BaseModel): """ Deployment - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the deployment.") name: StrictStr = Field(description="Name of the deployment.") owner: Owner = Field(description="Owner of the deployment.") command: StrictStr = Field(description="Command that runs on start.") description: StrictStr = Field(description="Description of the deployment.") - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the deployment." - ) + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the deployment.") instance_size: StrictStr = Field(description="Instance size of the deployment.") image_tag: ImageTag = Field(description="Image tag that is attached to the deployment.") - extra_packages: Optional[ExtraPackages] = Field( - description="Addtitional packages to install on start." - ) + extra_packages: Optional[ExtraPackages] = Field(description="Addtitional packages to install on start.") scale: StrictInt = Field(description="Number of pod replicas.") - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script that runs on start before the primary command." - ) - environment_variables: Dict[str, StrictStr] = Field( - description="Mapping of environment variable keys to values." - ) + start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") + environment_variables: Dict[str, StrictStr] = Field(description="Mapping of environment variable keys to values.") working_dir: StrictStr = Field(description="Initial working directory.") start_ssh: StrictBool = Field(description="Enable SSH access on the deployment.") is_spot: StrictBool = Field(description="Enables running on spot instance sizes.") - healthcheck: Optional[StrictStr] = Field( - default=None, description="Healthcheck path on the deployment's primary port." - ) + healthcheck: Optional[StrictStr] = Field(default=None, description="Healthcheck path on the deployment's primary port.") subdomain: StrictStr = Field(description="Subdomain for the deployment URL.") start_dind: StrictBool = Field(description="Enables docker-in-docker.") last_deploy: StrictStr = Field(description="Last started timestamp.") k8s_name: StrictStr = Field(description="Unique name for associated kubernetes objects.") created_at: StrictStr = Field(description="Creation timestamp") updated_at: StrictStr = Field(description="Update timestamp.") - require_restart: StrictBool = Field( - description="True if an update was applied that requires restart to take effect." - ) - resource_type: Literal["deployment"] + require_restart: StrictBool = Field(description="True if an update was applied that requires restart to take effect.") + resource_type: Literal['deployment'] size_display: StrictStr = Field(description="Description of the instance size.") - dask_cluster: Optional[DaskClusterNested] = Field( - default=None, description="Dask cluster attached to the deployment." - ) + dask_cluster: Optional[DaskClusterNested] = Field(default=None, description="Dask cluster attached to the deployment.") status: StrictStr = Field(description="Current status of the deployment.") running_count: StrictInt = Field(description="Number of running pods.") debug_mode: StrictBool = Field(description="True if deployment is running in debug mode.") url: StrictStr = Field(description="External URL for the deployment.") - ssh_url: Optional[StrictStr] = Field( - default=None, description="External SSH URL for the deployment." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "command", - "description", - "tags", - "instance_size", - "image_tag", - "extra_packages", - "scale", - "start_script", - "environment_variables", - "working_dir", - "start_ssh", - "is_spot", - "healthcheck", - "subdomain", - "start_dind", - "last_deploy", - "k8s_name", - "created_at", - "updated_at", - "require_restart", - "resource_type", - "size_display", - "dask_cluster", - "status", - "running_count", - "debug_mode", - "url", - "ssh_url", - ] + ssh_url: Optional[StrictStr] = Field(default=None, description="External SSH URL for the deployment.") + __properties: ClassVar[List[str]] = ["id", "name", "owner", "command", "description", "tags", "instance_size", "image_tag", "extra_packages", "scale", "start_script", "environment_variables", "working_dir", "start_ssh", "is_spot", "healthcheck", "subdomain", "start_dind", "last_deploy", "k8s_name", "created_at", "updated_at", "require_restart", "resource_type", "size_display", "dask_cluster", "status", "running_count", "debug_mode", "url", "ssh_url"] - @field_validator("resource_type") + @field_validator('resource_type') def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["deployment"]): + if value not in set(['deployment']): raise ValueError("must be one of enum values ('deployment')") return value @@ -134,6 +76,7 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -188,40 +131,38 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "command", - "description", - "instance_size", - "image_tag", - "extra_packages", - "scale", - "start_script", - "environment_variables", - "working_dir", - "start_ssh", - "is_spot", - "healthcheck", - "subdomain", - "start_dind", - "last_deploy", - "k8s_name", - "created_at", - "updated_at", - "require_restart", - "resource_type", - "size_display", - "dask_cluster", - "status", - "running_count", - "debug_mode", - "url", - "ssh_url", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "command", + "description", + "instance_size", + "image_tag", + "extra_packages", + "scale", + "start_script", + "environment_variables", + "working_dir", + "start_ssh", + "is_spot", + "healthcheck", + "subdomain", + "start_dind", + "last_deploy", + "k8s_name", + "created_at", + "updated_at", + "require_restart", + "resource_type", + "size_display", + "dask_cluster", + "status", + "running_count", + "debug_mode", + "url", + "ssh_url", + ]) _dict = self.model_dump( by_alias=True, @@ -230,30 +171,30 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image_tag if self.image_tag: - _dict["image_tag"] = self.image_tag.to_dict() + _dict['image_tag'] = self.image_tag.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict["dask_cluster"] = self.dask_cluster.to_dict() + _dict['dask_cluster'] = self.dask_cluster.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None return _dict @@ -266,51 +207,39 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "command": obj.get("command"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_tag": ( - ImageTag.from_dict(obj["image_tag"]) - if obj.get("image_tag") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "scale": obj.get("scale"), - "start_script": obj.get("start_script"), - "environment_variables": obj.get("environment_variables"), - "working_dir": obj.get("working_dir"), - "start_ssh": obj.get("start_ssh"), - "is_spot": obj.get("is_spot"), - "healthcheck": obj.get("healthcheck"), - "subdomain": obj.get("subdomain"), - "start_dind": obj.get("start_dind"), - "last_deploy": obj.get("last_deploy"), - "k8s_name": obj.get("k8s_name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "require_restart": obj.get("require_restart"), - "resource_type": obj.get("resource_type"), - "size_display": obj.get("size_display"), - "dask_cluster": ( - DaskClusterNested.from_dict(obj["dask_cluster"]) - if obj.get("dask_cluster") is not None - else None - ), - "status": obj.get("status"), - "running_count": obj.get("running_count"), - "debug_mode": obj.get("debug_mode"), - "url": obj.get("url"), - "ssh_url": obj.get("ssh_url"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "command": obj.get("command"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_tag": ImageTag.from_dict(obj["image_tag"]) if obj.get("image_tag") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "scale": obj.get("scale"), + "start_script": obj.get("start_script"), + "environment_variables": obj.get("environment_variables"), + "working_dir": obj.get("working_dir"), + "start_ssh": obj.get("start_ssh"), + "is_spot": obj.get("is_spot"), + "healthcheck": obj.get("healthcheck"), + "subdomain": obj.get("subdomain"), + "start_dind": obj.get("start_dind"), + "last_deploy": obj.get("last_deploy"), + "k8s_name": obj.get("k8s_name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "require_restart": obj.get("require_restart"), + "resource_type": obj.get("resource_type"), + "size_display": obj.get("size_display"), + "dask_cluster": DaskClusterNested.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, + "status": obj.get("status"), + "running_count": obj.get("running_count"), + "debug_mode": obj.get("debug_mode"), + "url": obj.get("url"), + "ssh_url": obj.get("ssh_url") + }) return _obj + + diff --git a/saturn_api/models/deployment_create.py b/saturn_api/models/deployment_create.py index 84c20c9..d03ba3d 100644 --- a/saturn_api/models/deployment_create.py +++ b/saturn_api/models/deployment_create.py @@ -1,111 +1,56 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentCreate(BaseModel): """ DeploymentCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the deployment.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the deployment.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default="", description="Description of the deployment." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the deployment." - ) - instance_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the deployment." - ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the deployment.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the deployment.") + instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the deployment.") image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field( - default=True, description="Enable image trust validation before attaching." - ) - environment_variables: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Mapping of environment variable keys to values." - ) - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( - default=None, description="List of external repo attachments for the deployment." - ) - extra_packages: Optional[ExtraPackages] = Field( - default=None, description="Addtitional packages to install on start." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script to run on start before the primary command." - ) - working_dir: Optional[StrictStr] = Field( - default="/home/jovyan/workspace", - description="Initial working directory for the deployment.", - ) - is_spot: Optional[StrictBool] = Field( - default=False, description="Enables running on spot instance sizes." - ) + image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") + environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments for the deployment.") + extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script to run on start before the primary command.") + working_dir: Optional[StrictStr] = Field(default='/home/jovyan/workspace', description="Initial working directory for the deployment.") + is_spot: Optional[StrictBool] = Field(default=False, description="Enables running on spot instance sizes.") start_dind: Optional[StrictBool] = Field(default=False, description="Enables docker-in-docker.") - command: Annotated[str, Field(min_length=1, strict=True)] = Field( - description="Command that runs on start." - ) - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( - default=1, description="Number of pod replicas." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="Subdomain for the deployment URL." - ) - healthcheck: Optional[StrictStr] = Field( - default=None, description="Healthcheck path on the deployment's primary port." - ) - start_ssh: Optional[StrictBool] = Field( - default=False, description="Enable SSH access on the deployment." - ) - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "tags", - "instance_size", - "image_uri", - "image_tag_id", - "image_enforce_trusted", - "environment_variables", - "external_repo_attachments", - "extra_packages", - "start_script", - "working_dir", - "is_spot", - "start_dind", - "command", - "scale", - "subdomain", - "healthcheck", - "start_ssh", - ] + command: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Command that runs on start.") + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Number of pod replicas.") + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the deployment URL.") + healthcheck: Optional[StrictStr] = Field(default=None, description="Healthcheck path on the deployment's primary port.") + start_ssh: Optional[StrictBool] = Field(default=False, description="Enable SSH access on the deployment.") + __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "instance_size", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "is_spot", "start_dind", "command", "scale", "subdomain", "healthcheck", "start_ssh"] model_config = ConfigDict( populate_by_name=True, @@ -113,6 +58,7 @@ class DeploymentCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -137,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -146,49 +93,46 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in external_repo_attachments (list) _items = [] if self.external_repo_attachments: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if environment_variables (nullable) is None # and model_fields_set contains the field if self.environment_variables is None and "environment_variables" in self.model_fields_set: - _dict["environment_variables"] = None + _dict['environment_variables'] = None # set to None if external_repo_attachments (nullable) is None # and model_fields_set contains the field - if ( - self.external_repo_attachments is None - and "external_repo_attachments" in self.model_fields_set - ): - _dict["external_repo_attachments"] = None + if self.external_repo_attachments is None and "external_repo_attachments" in self.model_fields_set: + _dict['external_repo_attachments'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if healthcheck (nullable) is None # and model_fields_set contains the field if self.healthcheck is None and "healthcheck" in self.model_fields_set: - _dict["healthcheck"] = None + _dict['healthcheck'] = None return _dict @@ -201,49 +145,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description") if obj.get("description") is not None else "", - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": ( - obj.get("image_enforce_trusted") - if obj.get("image_enforce_trusted") is not None - else True - ), - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": ( - [ - ExternalRepoAttachmentNested.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "working_dir": ( - obj.get("working_dir") - if obj.get("working_dir") is not None - else "/home/jovyan/workspace" - ), - "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, - "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "subdomain": obj.get("subdomain"), - "healthcheck": obj.get("healthcheck"), - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description") if obj.get("description") is not None else '', + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir") if obj.get("working_dir") is not None else '/home/jovyan/workspace', + "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, + "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "subdomain": obj.get("subdomain"), + "healthcheck": obj.get("healthcheck"), + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False + }) return _obj + + diff --git a/saturn_api/models/deployment_list.py b/saturn_api/models/deployment_list.py index bf948c9..aa505d4 100644 --- a/saturn_api/models/deployment_list.py +++ b/saturn_api/models/deployment_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.deployment import Deployment - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentList(BaseModel): """ DeploymentList - """ # noqa: E501 - + """ # noqa: E501 deployments: List[Deployment] = Field(description="List of deployments.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class DeploymentList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "deployments", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "deployments", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_deployments in self.deployments: if _item_deployments: _items.append(_item_deployments.to_dict()) - _dict["deployments"] = _items + _dict['deployments'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployments": ( - [Deployment.from_dict(_item) for _item in obj["deployments"]] - if obj.get("deployments") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "deployments": [Deployment.from_dict(_item) for _item in obj["deployments"]] if obj.get("deployments") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/deployment_recipe.py b/saturn_api/models/deployment_recipe.py index 455c9db..ac81720 100644 --- a/saturn_api/models/deployment_recipe.py +++ b/saturn_api/models/deployment_recipe.py @@ -1,45 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.deployment_spec import DeploymentSpec from saturn_api.models.resource_state import ResourceState - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentRecipe(BaseModel): """ DeploymentRecipe - """ # noqa: E501 - - schema_version: Optional[StrictStr] = "2025.10.01" - type: Literal["deployment"] + """ # noqa: E501 + schema_version: Optional[StrictStr] = '2025.10.01' + type: Literal['deployment'] spec: DeploymentSpec state: Optional[ResourceState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator("type") + @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["deployment"]): + if value not in set(['deployment']): raise ValueError("must be one of enum values ('deployment')") return value @@ -49,6 +47,7 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,11 +73,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "state", - ] - ) + excluded_fields: Set[str] = set([ + "state", + ]) _dict = self.model_dump( by_alias=True, @@ -87,10 +84,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict["spec"] = self.spec.to_dict() + _dict['spec'] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() return _dict @classmethod @@ -102,20 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schema_version": ( - obj.get("schema_version") - if obj.get("schema_version") is not None - else "2025.10.01" - ), - "type": obj.get("type"), - "spec": ( - DeploymentSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None - ), - "state": ( - ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', + "type": obj.get("type"), + "spec": DeploymentSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "state": ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None + }) return _obj + + diff --git a/saturn_api/models/deployment_route_recipe.py b/saturn_api/models/deployment_route_recipe.py index 8cd0fb7..c8a1345 100644 --- a/saturn_api/models/deployment_route_recipe.py +++ b/saturn_api/models/deployment_route_recipe.py @@ -1,47 +1,45 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentRouteRecipe(BaseModel): """ DeploymentRouteRecipe - """ # noqa: E501 - - subdomain: Optional[StrictStr] = "" + """ # noqa: E501 + subdomain: Optional[StrictStr] = '' container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] - visibility: Literal["unauthenticated", "account", "org", "owner"] | None = None + visibility: Literal['unauthenticated', 'account', 'org', 'owner'] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator("visibility") + @field_validator('visibility') def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["unauthenticated", "account", "org", "owner"]): - raise ValueError( - "must be one of enum values ('unauthenticated', 'account', 'org', 'owner')" - ) + if value not in set(['unauthenticated', 'account', 'org', 'owner']): + raise ValueError("must be one of enum values ('unauthenticated', 'account', 'org', 'owner')") return value model_config = ConfigDict( @@ -50,6 +48,7 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else "", - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility"), - } - ) + _obj = cls.model_validate({ + "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else '', + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility") + }) return _obj + + diff --git a/saturn_api/models/deployment_runtime_summary.py b/saturn_api/models/deployment_runtime_summary.py index b1184b2..2ea10f1 100644 --- a/saturn_api/models/deployment_runtime_summary.py +++ b/saturn_api/models/deployment_runtime_summary.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.condition import Condition from saturn_api.models.deployment_status import DeploymentStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentRuntimeSummary(BaseModel): """ DeploymentRuntimeSummary - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr namespace: StrictStr uid: StrictStr @@ -45,22 +43,7 @@ class DeploymentRuntimeSummary(BaseModel): scale: StrictInt running_count: StrictInt active_count: StrictInt - __properties: ClassVar[List[str]] = [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "status", - "scale", - "running_count", - "active_count", - ] + __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "scale", "running_count", "active_count"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +51,7 @@ class DeploymentRuntimeSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -105,23 +89,21 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "scale", - "running_count", - "active_count", - ] - ) + excluded_fields: Set[str] = set([ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "scale", + "running_count", + "active_count", + ]) _dict = self.model_dump( by_alias=True, @@ -134,26 +116,26 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict["conditions"] = _items + _dict['conditions'] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict["controller_uid"] = None + _dict['controller_uid'] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict["controller_kind"] = None + _dict['controller_kind'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict["deleted_at"] = None + _dict['deleted_at'] = None return _dict @@ -166,26 +148,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": ( - [Condition.from_dict(_item) for _item in obj["conditions"]] - if obj.get("conditions") is not None - else None - ), - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "scale": obj.get("scale"), - "running_count": obj.get("running_count"), - "active_count": obj.get("active_count"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "scale": obj.get("scale"), + "running_count": obj.get("running_count"), + "active_count": obj.get("active_count") + }) return _obj + + diff --git a/saturn_api/models/deployment_server_info.py b/saturn_api/models/deployment_server_info.py index a5295c2..34d7dd2 100644 --- a/saturn_api/models/deployment_server_info.py +++ b/saturn_api/models/deployment_server_info.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.default_images import DefaultImages from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.server_options_size import ServerOptionsSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentServerInfo(BaseModel): """ DeploymentServerInfo - """ # noqa: E501 - + """ # noqa: E501 server_options: ServerOptionsSize = Field(description="Configuration options for deployments.") default_images: DefaultImages = Field(description="Default images for deployments.") default_sizes: DefaultSizes = Field(description="Default instance sizes for deployments.") @@ -42,6 +40,7 @@ class DeploymentServerInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,13 +75,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict["server_options"] = self.server_options.to_dict() + _dict['server_options'] = self.server_options.to_dict() # override the default output from pydantic by calling `to_dict()` of default_images if self.default_images: - _dict["default_images"] = self.default_images.to_dict() + _dict['default_images'] = self.default_images.to_dict() # override the default output from pydantic by calling `to_dict()` of default_sizes if self.default_sizes: - _dict["default_sizes"] = self.default_sizes.to_dict() + _dict['default_sizes'] = self.default_sizes.to_dict() return _dict @classmethod @@ -93,23 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "server_options": ( - ServerOptionsSize.from_dict(obj["server_options"]) - if obj.get("server_options") is not None - else None - ), - "default_images": ( - DefaultImages.from_dict(obj["default_images"]) - if obj.get("default_images") is not None - else None - ), - "default_sizes": ( - DefaultSizes.from_dict(obj["default_sizes"]) - if obj.get("default_sizes") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "server_options": ServerOptionsSize.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None, + "default_images": DefaultImages.from_dict(obj["default_images"]) if obj.get("default_images") is not None else None, + "default_sizes": DefaultSizes.from_dict(obj["default_sizes"]) if obj.get("default_sizes") is not None else None + }) return _obj + + diff --git a/saturn_api/models/deployment_spec.py b/saturn_api/models/deployment_spec.py index 5cd08c7..48c00e8 100644 --- a/saturn_api/models/deployment_spec.py +++ b/saturn_api/models/deployment_spec.py @@ -1,53 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictStr, - field_validator, -) -from typing_extensions import Annotated, Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment from saturn_api.models.deployment_route_recipe import DeploymentRouteRecipe -from saturn_api.models.external_repo_attachment_recipe import ( - ExternalRepoAttachmentRecipe, -) +from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe from saturn_api.models.image_tag_reference import ImageTagReference from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe -from saturn_api.models.shared_folder_attachment_recipe import ( - SharedFolderAttachmentRecipe, -) +from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe from saturn_api.models.viewer_recipe import ViewerRecipe - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentSpec(BaseModel): """ DeploymentSpec - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr owner: Optional[OwnerReference] = None description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None @@ -64,46 +52,22 @@ class DeploymentSpec(BaseModel): secrets: Optional[List[SecretAttachmentRecipe]] = None shared_folders: Optional[List[SharedFolderAttachmentRecipe]] = None start_dind: Optional[StrictBool] = None - status: Literal["stopped", "running"] | None = None + status: Literal['stopped', 'running'] | None = None command: Annotated[str, Field(min_length=1, strict=True)] scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1 start_ssh: Optional[StrictBool] = False use_spot_instance: Optional[StrictBool] = False routes: Optional[List[DeploymentRouteRecipe]] = None viewers: Optional[List[ViewerRecipe]] = None - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "tags", - "image", - "instance_type", - "environment_variables", - "working_directory", - "extra_packages", - "start_script", - "token_scope", - "dask_cluster", - "git_repositories", - "secrets", - "shared_folders", - "start_dind", - "status", - "command", - "scale", - "start_ssh", - "use_spot_instance", - "routes", - "viewers", - ] + __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "image", "instance_type", "environment_variables", "working_directory", "extra_packages", "start_script", "token_scope", "dask_cluster", "git_repositories", "secrets", "shared_folders", "start_dind", "status", "command", "scale", "start_ssh", "use_spot_instance", "routes", "viewers"] - @field_validator("status") + @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["stopped", "running"]): + if value not in set(['stopped', 'running']): raise ValueError("must be one of enum values ('stopped', 'running')") return value @@ -113,6 +77,7 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -137,7 +102,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -146,70 +112,70 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict["image"] = self.image.to_dict() + _dict['image'] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict["dask_cluster"] = self.dask_cluster.to_dict() + _dict['dask_cluster'] = self.dask_cluster.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in git_repositories (list) _items = [] if self.git_repositories: for _item_git_repositories in self.git_repositories: if _item_git_repositories: _items.append(_item_git_repositories.to_dict()) - _dict["git_repositories"] = _items + _dict['git_repositories'] = _items # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) _items = [] if self.secrets: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict["secrets"] = _items + _dict['secrets'] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_folders (list) _items = [] if self.shared_folders: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict["shared_folders"] = _items + _dict['shared_folders'] = _items # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict["routes"] = _items + _dict['routes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in viewers (list) _items = [] if self.viewers: for _item_viewers in self.viewers: if _item_viewers: _items.append(_item_viewers.to_dict()) - _dict["viewers"] = _items + _dict['viewers'] = _items # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if token_scope (nullable) is None # and model_fields_set contains the field if self.token_scope is None and "token_scope" in self.model_fields_set: - _dict["token_scope"] = None + _dict['token_scope'] = None # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict["status"] = None + _dict['status'] = None return _dict @@ -222,75 +188,31 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image": ( - ImageTagReference.from_dict(obj["image"]) - if obj.get("image") is not None - else None - ), - "instance_type": obj.get("instance_type"), - "environment_variables": obj.get("environment_variables"), - "working_directory": obj.get("working_directory"), - "extra_packages": ( - ExtraPackagesRecipe.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "token_scope": obj.get("token_scope"), - "dask_cluster": ( - DaskClusterAttachment.from_dict(obj["dask_cluster"]) - if obj.get("dask_cluster") is not None - else None - ), - "git_repositories": ( - [ - ExternalRepoAttachmentRecipe.from_dict(_item) - for _item in obj["git_repositories"] - ] - if obj.get("git_repositories") is not None - else None - ), - "secrets": ( - [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] - if obj.get("secrets") is not None - else None - ), - "shared_folders": ( - [ - SharedFolderAttachmentRecipe.from_dict(_item) - for _item in obj["shared_folders"] - ] - if obj.get("shared_folders") is not None - else None - ), - "start_dind": obj.get("start_dind"), - "status": obj.get("status"), - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - "use_spot_instance": ( - obj.get("use_spot_instance") - if obj.get("use_spot_instance") is not None - else False - ), - "routes": ( - [DeploymentRouteRecipe.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None - ), - "viewers": ( - [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] - if obj.get("viewers") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "tags": obj.get("tags"), + "image": ImageTagReference.from_dict(obj["image"]) if obj.get("image") is not None else None, + "instance_type": obj.get("instance_type"), + "environment_variables": obj.get("environment_variables"), + "working_directory": obj.get("working_directory"), + "extra_packages": ExtraPackagesRecipe.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "token_scope": obj.get("token_scope"), + "dask_cluster": DaskClusterAttachment.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, + "git_repositories": [ExternalRepoAttachmentRecipe.from_dict(_item) for _item in obj["git_repositories"]] if obj.get("git_repositories") is not None else None, + "secrets": [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, + "shared_folders": [SharedFolderAttachmentRecipe.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, + "start_dind": obj.get("start_dind"), + "status": obj.get("status"), + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + "use_spot_instance": obj.get("use_spot_instance") if obj.get("use_spot_instance") is not None else False, + "routes": [DeploymentRouteRecipe.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "viewers": [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] if obj.get("viewers") is not None else None + }) return _obj + + diff --git a/saturn_api/models/deployment_start.py b/saturn_api/models/deployment_start.py index 9333ea4..2c0ef9d 100644 --- a/saturn_api/models/deployment_start.py +++ b/saturn_api/models/deployment_start.py @@ -1,36 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class DeploymentStart(BaseModel): """ DeploymentStart - """ # noqa: E501 - - debug_mode: Optional[StrictBool] = Field( - default=None, - description="Enable debug mode. Deployment will continue to run on error, and SSH will be enabled.", - ) + """ # noqa: E501 + debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Deployment will continue to run on error, and SSH will be enabled.") __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -39,6 +35,7 @@ class DeploymentStart(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) + _obj = cls.model_validate({ + "debug_mode": obj.get("debug_mode") + }) return _obj + + diff --git a/saturn_api/models/deployment_status.py b/saturn_api/models/deployment_status.py index f327d1c..35ca0c3 100644 --- a/saturn_api/models/deployment_status.py +++ b/saturn_api/models/deployment_status.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,13 +26,15 @@ class DeploymentStatus(str, Enum): """ allowed enum values """ - PENDING = "pending" - RUNNING = "running" - STOPPING = "stopping" - STOPPED = "stopped" - ERROR = "error" + PENDING = 'pending' + RUNNING = 'running' + STOPPING = 'stopping' + STOPPED = 'stopped' + ERROR = 'error' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/deployment_update.py b/saturn_api/models/deployment_update.py index cb8ddf0..2ef466f 100644 --- a/saturn_api/models/deployment_update.py +++ b/saturn_api/models/deployment_update.py @@ -1,105 +1,54 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested from saturn_api.models.extra_packages import ExtraPackages - +from typing import Literal, Optional, Set +from typing_extensions import Self class DeploymentUpdate(BaseModel): """ DeploymentUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the deployment.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default=None, description="Description of the deployment." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the deployment." - ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the deployment.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the deployment.") image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field( - default=True, description="Enable image trust validation before attaching." - ) - environment_variables: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Mapping of environment variable keys to values." - ) - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( - default=None, description="List of external repo attachments." - ) - extra_packages: Optional[ExtraPackages] = Field( - default=None, description="Addtitional packages to install on start." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script that runs on start before the primary command." - ) + image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") + environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments.") + extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") working_dir: Optional[StrictStr] = Field(default=None, description="Initial working directory.") - instance_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the deployment." - ) - is_spot: Optional[StrictBool] = Field( - default=None, description="Enables running on spot instance sizes." - ) + instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the deployment.") + is_spot: Optional[StrictBool] = Field(default=None, description="Enables running on spot instance sizes.") start_dind: Optional[StrictBool] = Field(default=None, description="Enables docker-in-docker.") - command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( - default=None, description="Command that runs on start." - ) - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( - default=None, description="Number of pod replicas." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="Subdomain for the deployment URL." - ) - healthcheck: Optional[StrictStr] = Field( - default=None, description="Healthcheck path on the deployment's primary port." - ) - start_ssh: Optional[StrictBool] = Field( - default=None, description="Enable SSH access on the deployment." - ) - __properties: ClassVar[List[str]] = [ - "name", - "description", - "tags", - "image_uri", - "image_tag_id", - "image_enforce_trusted", - "environment_variables", - "external_repo_attachments", - "extra_packages", - "start_script", - "working_dir", - "instance_size", - "is_spot", - "start_dind", - "command", - "scale", - "subdomain", - "healthcheck", - "start_ssh", - ] + command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Command that runs on start.") + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Number of pod replicas.") + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the deployment URL.") + healthcheck: Optional[StrictStr] = Field(default=None, description="Healthcheck path on the deployment's primary port.") + start_ssh: Optional[StrictBool] = Field(default=None, description="Enable SSH access on the deployment.") + __properties: ClassVar[List[str]] = ["name", "description", "tags", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "instance_size", "is_spot", "start_dind", "command", "scale", "subdomain", "healthcheck", "start_ssh"] model_config = ConfigDict( populate_by_name=True, @@ -107,6 +56,7 @@ class DeploymentUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -131,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -144,34 +95,34 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict["subdomain"] = None + _dict['subdomain'] = None # set to None if healthcheck (nullable) is None # and model_fields_set contains the field if self.healthcheck is None and "healthcheck" in self.model_fields_set: - _dict["healthcheck"] = None + _dict['healthcheck'] = None return _dict @@ -184,42 +135,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": ( - obj.get("image_enforce_trusted") - if obj.get("image_enforce_trusted") is not None - else True - ), - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": ( - [ - ExternalRepoAttachmentNested.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir"), - "instance_size": obj.get("instance_size"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "command": obj.get("command"), - "scale": obj.get("scale"), - "subdomain": obj.get("subdomain"), - "healthcheck": obj.get("healthcheck"), - "start_ssh": obj.get("start_ssh"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir"), + "instance_size": obj.get("instance_size"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "command": obj.get("command"), + "scale": obj.get("scale"), + "subdomain": obj.get("subdomain"), + "healthcheck": obj.get("healthcheck"), + "start_ssh": obj.get("start_ssh") + }) return _obj + + diff --git a/saturn_api/models/external_repo.py b/saturn_api/models/external_repo.py index f86bb56..edd18c4 100644 --- a/saturn_api/models/external_repo.py +++ b/saturn_api/models/external_repo.py @@ -1,55 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner import Owner from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial - +from typing import Literal, Optional, Set +from typing_extensions import Self class ExternalRepo(BaseModel): """ ExternalRepo - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the repository.") name: StrictStr = Field(description="Name of the repository.") owner: Owner = Field(description="Owner of the repository") created_at: StrictStr = Field(description="Creation timestamp.") remote_url: StrictStr = Field(description="Repository URL.") - ssh_privatekey_id: Optional[StrictStr] = Field( - default=None, description="ID of an SSH Private Key with permission to pull the repository." - ) - ssh_privatekey: Optional[SSHPrivateKeyPartial] = Field( - default=None, description="SSH Private Key information." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "created_at", - "remote_url", - "ssh_privatekey_id", - "ssh_privatekey", - ] + ssh_privatekey_id: Optional[StrictStr] = Field(default=None, description="ID of an SSH Private Key with permission to pull the repository.") + ssh_privatekey: Optional[SSHPrivateKeyPartial] = Field(default=None, description="SSH Private Key information.") + __properties: ClassVar[List[str]] = ["id", "name", "owner", "created_at", "remote_url", "ssh_privatekey_id", "ssh_privatekey"] model_config = ConfigDict( populate_by_name=True, @@ -57,6 +43,7 @@ class ExternalRepo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -88,17 +75,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "created_at", - "remote_url", - "ssh_privatekey_id", - "ssh_privatekey", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "created_at", + "remote_url", + "ssh_privatekey_id", + "ssh_privatekey", + ]) _dict = self.model_dump( by_alias=True, @@ -107,10 +92,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of ssh_privatekey if self.ssh_privatekey: - _dict["ssh_privatekey"] = self.ssh_privatekey.to_dict() + _dict['ssh_privatekey'] = self.ssh_privatekey.to_dict() return _dict @classmethod @@ -122,19 +107,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "created_at": obj.get("created_at"), - "remote_url": obj.get("remote_url"), - "ssh_privatekey_id": obj.get("ssh_privatekey_id"), - "ssh_privatekey": ( - SSHPrivateKeyPartial.from_dict(obj["ssh_privatekey"]) - if obj.get("ssh_privatekey") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "created_at": obj.get("created_at"), + "remote_url": obj.get("remote_url"), + "ssh_privatekey_id": obj.get("ssh_privatekey_id"), + "ssh_privatekey": SSHPrivateKeyPartial.from_dict(obj["ssh_privatekey"]) if obj.get("ssh_privatekey") is not None else None + }) return _obj + + diff --git a/saturn_api/models/external_repo_attachment.py b/saturn_api/models/external_repo_attachment.py index 2d0ea60..79f1794 100644 --- a/saturn_api/models/external_repo_attachment.py +++ b/saturn_api/models/external_repo_attachment.py @@ -1,66 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExternalRepoAttachment(BaseModel): """ ExternalRepoAttachment - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the external repository attachment.") - has_sshkey: StrictBool = Field( - description="True if the repository has an attached SSH Private Key" - ) + has_sshkey: StrictBool = Field(description="True if the repository has an attached SSH Private Key") path: StrictStr = Field(description="Path of the repository in the resource it is attached to.") created_at: StrictStr = Field(description="Creation timestamp.") external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") remote_url: StrictStr = Field(description="Repository URL") - deployment_id: Optional[StrictStr] = Field( - default=None, description="Deployment ID the repository is attached to." - ) - workspace_id: Optional[StrictStr] = Field( - default=None, description="Workspace ID the repository is attached to." - ) - on_restart: StrictStr = Field( - description="Repository clone behavior on restart. Preserve only applies when path is in a persistent volume." - ) - ref: Optional[StrictStr] = Field( - default=None, description="Git version reference on the repository." - ) + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID the repository is attached to.") + workspace_id: Optional[StrictStr] = Field(default=None, description="Workspace ID the repository is attached to.") + on_restart: StrictStr = Field(description="Repository clone behavior on restart. Preserve only applies when path is in a persistent volume.") + ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") ref_type: Optional[StrictStr] = Field(default=None, description="Type of the git ref.") - __properties: ClassVar[List[str]] = [ - "id", - "has_sshkey", - "path", - "created_at", - "external_repo_id", - "remote_url", - "deployment_id", - "workspace_id", - "on_restart", - "ref", - "ref_type", - ] + __properties: ClassVar[List[str]] = ["id", "has_sshkey", "path", "created_at", "external_repo_id", "remote_url", "deployment_id", "workspace_id", "on_restart", "ref", "ref_type"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +45,7 @@ class ExternalRepoAttachment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -103,21 +81,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "has_sshkey", - "path", - "created_at", - "external_repo_id", - "remote_url", - "deployment_id", - "workspace_id", - "on_restart", - "ref", - "ref_type", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "has_sshkey", + "path", + "created_at", + "external_repo_id", + "remote_url", + "deployment_id", + "workspace_id", + "on_restart", + "ref", + "ref_type", + ]) _dict = self.model_dump( by_alias=True, @@ -127,22 +103,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if deployment_id (nullable) is None # and model_fields_set contains the field if self.deployment_id is None and "deployment_id" in self.model_fields_set: - _dict["deployment_id"] = None + _dict['deployment_id'] = None # set to None if workspace_id (nullable) is None # and model_fields_set contains the field if self.workspace_id is None and "workspace_id" in self.model_fields_set: - _dict["workspace_id"] = None + _dict['workspace_id'] = None # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict["ref"] = None + _dict['ref'] = None # set to None if ref_type (nullable) is None # and model_fields_set contains the field if self.ref_type is None and "ref_type" in self.model_fields_set: - _dict["ref_type"] = None + _dict['ref_type'] = None return _dict @@ -155,19 +131,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "has_sshkey": obj.get("has_sshkey"), - "path": obj.get("path"), - "created_at": obj.get("created_at"), - "external_repo_id": obj.get("external_repo_id"), - "remote_url": obj.get("remote_url"), - "deployment_id": obj.get("deployment_id"), - "workspace_id": obj.get("workspace_id"), - "on_restart": obj.get("on_restart"), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "has_sshkey": obj.get("has_sshkey"), + "path": obj.get("path"), + "created_at": obj.get("created_at"), + "external_repo_id": obj.get("external_repo_id"), + "remote_url": obj.get("remote_url"), + "deployment_id": obj.get("deployment_id"), + "workspace_id": obj.get("workspace_id"), + "on_restart": obj.get("on_restart"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type") + }) return _obj + + diff --git a/saturn_api/models/external_repo_attachment_create.py b/saturn_api/models/external_repo_attachment_create.py index 3b7d22d..4425865 100644 --- a/saturn_api/models/external_repo_attachment_create.py +++ b/saturn_api/models/external_repo_attachment_create.py @@ -1,70 +1,57 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.resource_reference import ResourceReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ExternalRepoAttachmentCreate(BaseModel): """ ExternalRepoAttachmentCreate - """ # noqa: E501 - + """ # noqa: E501 external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") resource: ResourceReference = Field(description="Reference to a resource to attach to.") - path: Optional[StrictStr] = Field( - default=None, description="Path of the repository in the resource it is attached to." - ) - on_restart: Literal["preserve changes", "reclone"] = "preserve changes" - ref: Optional[StrictStr] = Field( - default=None, description="Git version reference on the repository." - ) - ref_type: Literal["branch", "commit", "tag"] = "branch" - __properties: ClassVar[List[str]] = [ - "external_repo_id", - "resource", - "path", - "on_restart", - "ref", - "ref_type", - ] - - @field_validator("on_restart") + path: Optional[StrictStr] = Field(default=None, description="Path of the repository in the resource it is attached to.") + on_restart: Literal['preserve changes', 'reclone'] = 'preserve changes' + ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") + ref_type: Literal['branch', 'commit', 'tag'] = 'branch' + __properties: ClassVar[List[str]] = ["external_repo_id", "resource", "path", "on_restart", "ref", "ref_type"] + + @field_validator('on_restart') def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["preserve changes", "reclone"]): + if value not in set(['preserve changes', 'reclone']): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator("ref_type") + @field_validator('ref_type') def ref_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["branch", "commit", "tag"]): + if value not in set(['branch', 'commit', 'tag']): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -74,6 +61,7 @@ def ref_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -98,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -107,11 +96,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of resource if self.resource: - _dict["resource"] = self.resource.to_dict() + _dict['resource'] = self.resource.to_dict() # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict["ref"] = None + _dict['ref'] = None return _dict @@ -124,22 +113,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "external_repo_id": obj.get("external_repo_id"), - "resource": ( - ResourceReference.from_dict(obj["resource"]) - if obj.get("resource") is not None - else None - ), - "path": obj.get("path"), - "on_restart": ( - obj.get("on_restart") - if obj.get("on_restart") is not None - else "preserve changes" - ), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type") if obj.get("ref_type") is not None else "branch", - } - ) + _obj = cls.model_validate({ + "external_repo_id": obj.get("external_repo_id"), + "resource": ResourceReference.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "path": obj.get("path"), + "on_restart": obj.get("on_restart") if obj.get("on_restart") is not None else 'preserve changes', + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type") if obj.get("ref_type") is not None else 'branch' + }) return _obj + + diff --git a/saturn_api/models/external_repo_attachment_list.py b/saturn_api/models/external_repo_attachment_list.py index 9cc2e34..d78e8c0 100644 --- a/saturn_api/models/external_repo_attachment_list.py +++ b/saturn_api/models/external_repo_attachment_list.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.external_repo_attachment import ExternalRepoAttachment - +from typing import Literal, Optional, Set +from typing_extensions import Self class ExternalRepoAttachmentList(BaseModel): """ ExternalRepoAttachmentList - """ # noqa: E501 - - external_repo_attachments: List[ExternalRepoAttachment] = Field( - description="List of external repository attachments." - ) + """ # noqa: E501 + external_repo_attachments: List[ExternalRepoAttachment] = Field(description="List of external repository attachments.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["external_repo_attachments", "prev_key", "next_key"] @@ -42,6 +38,7 @@ class ExternalRepoAttachmentList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "external_repo_attachments", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "external_repo_attachments", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -88,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items return _dict @classmethod @@ -100,18 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "external_repo_attachments": ( - [ - ExternalRepoAttachment.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "external_repo_attachments": [ExternalRepoAttachment.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/external_repo_attachment_nested.py b/saturn_api/models/external_repo_attachment_nested.py index 3fff001..9e06fd7 100644 --- a/saturn_api/models/external_repo_attachment_nested.py +++ b/saturn_api/models/external_repo_attachment_nested.py @@ -1,66 +1,55 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExternalRepoAttachmentNested(BaseModel): """ ExternalRepoAttachmentNested - """ # noqa: E501 - - path: Optional[StrictStr] = Field( - default=None, description="Path of the repository in the resource it is attached to." - ) - on_restart: Literal["preserve changes", "reclone"] | None = None - ref: Optional[StrictStr] = Field( - default=None, description="Git version reference on the repository." - ) - ref_type: Literal["branch", "commit", "tag"] | None = None + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="Path of the repository in the resource it is attached to.") + on_restart: Literal['preserve changes', 'reclone'] | None = None + ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") + ref_type: Literal['branch', 'commit', 'tag'] | None = None external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") - __properties: ClassVar[List[str]] = [ - "path", - "on_restart", - "ref", - "ref_type", - "external_repo_id", - ] - - @field_validator("on_restart") + __properties: ClassVar[List[str]] = ["path", "on_restart", "ref", "ref_type", "external_repo_id"] + + @field_validator('on_restart') def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["preserve changes", "reclone"]): + if value not in set(['preserve changes', 'reclone']): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator("ref_type") + @field_validator('ref_type') def ref_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["branch", "commit", "tag"]): + if value not in set(['branch', 'commit', 'tag']): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -70,6 +59,7 @@ def ref_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -104,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict["ref"] = None + _dict['ref'] = None return _dict @@ -117,13 +108,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "path": obj.get("path"), - "on_restart": obj.get("on_restart"), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type"), - "external_repo_id": obj.get("external_repo_id"), - } - ) + _obj = cls.model_validate({ + "path": obj.get("path"), + "on_restart": obj.get("on_restart"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type"), + "external_repo_id": obj.get("external_repo_id") + }) return _obj + + diff --git a/saturn_api/models/external_repo_attachment_recipe.py b/saturn_api/models/external_repo_attachment_recipe.py index 8146a7d..67dcd63 100644 --- a/saturn_api/models/external_repo_attachment_recipe.py +++ b/saturn_api/models/external_repo_attachment_recipe.py @@ -1,64 +1,56 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExternalRepoAttachmentRecipe(BaseModel): """ ExternalRepoAttachmentRecipe - """ # noqa: E501 - + """ # noqa: E501 url: StrictStr path: Optional[StrictStr] = None - on_restart: Literal["preserve changes", "reclone"] | None = None + on_restart: Literal['preserve changes', 'reclone'] | None = None reference: Optional[StrictStr] = None - reference_type: Literal["branch", "commit", "tag"] = "branch" + reference_type: Literal['branch', 'commit', 'tag'] = 'branch' public: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = [ - "url", - "path", - "on_restart", - "reference", - "reference_type", - "public", - ] - - @field_validator("on_restart") + __properties: ClassVar[List[str]] = ["url", "path", "on_restart", "reference", "reference_type", "public"] + + @field_validator('on_restart') def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["preserve changes", "reclone"]): + if value not in set(['preserve changes', 'reclone']): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator("reference_type") + @field_validator('reference_type') def reference_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["branch", "commit", "tag"]): + if value not in set(['branch', 'commit', 'tag']): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -68,6 +60,7 @@ def reference_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,7 +85,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -102,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if reference (nullable) is None # and model_fields_set contains the field if self.reference is None and "reference" in self.model_fields_set: - _dict["reference"] = None + _dict['reference'] = None return _dict @@ -115,16 +109,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "url": obj.get("url"), - "path": obj.get("path"), - "on_restart": obj.get("on_restart"), - "reference": obj.get("reference"), - "reference_type": ( - obj.get("reference_type") if obj.get("reference_type") is not None else "branch" - ), - "public": obj.get("public") if obj.get("public") is not None else False, - } - ) + _obj = cls.model_validate({ + "url": obj.get("url"), + "path": obj.get("path"), + "on_restart": obj.get("on_restart"), + "reference": obj.get("reference"), + "reference_type": obj.get("reference_type") if obj.get("reference_type") is not None else 'branch', + "public": obj.get("public") if obj.get("public") is not None else False + }) return _obj + + diff --git a/saturn_api/models/external_repo_attachment_update.py b/saturn_api/models/external_repo_attachment_update.py index 3843666..3a440a4 100644 --- a/saturn_api/models/external_repo_attachment_update.py +++ b/saturn_api/models/external_repo_attachment_update.py @@ -1,59 +1,54 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExternalRepoAttachmentUpdate(BaseModel): """ ExternalRepoAttachmentUpdate - """ # noqa: E501 - - path: Optional[StrictStr] = Field( - default=None, description="Path of the repository in the resource it is attached to." - ) - on_restart: Literal["preserve changes", "reclone"] | None = None - ref: Optional[StrictStr] = Field( - default=None, description="Git version reference on the repository." - ) - ref_type: Literal["branch", "commit", "tag"] | None = None + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="Path of the repository in the resource it is attached to.") + on_restart: Literal['preserve changes', 'reclone'] | None = None + ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") + ref_type: Literal['branch', 'commit', 'tag'] | None = None __properties: ClassVar[List[str]] = ["path", "on_restart", "ref", "ref_type"] - @field_validator("on_restart") + @field_validator('on_restart') def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["preserve changes", "reclone"]): + if value not in set(['preserve changes', 'reclone']): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator("ref_type") + @field_validator('ref_type') def ref_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["branch", "commit", "tag"]): + if value not in set(['branch', 'commit', 'tag']): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -63,6 +58,7 @@ def ref_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -97,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict["ref"] = None + _dict['ref'] = None return _dict @@ -110,12 +107,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "path": obj.get("path"), - "on_restart": obj.get("on_restart"), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type"), - } - ) + _obj = cls.model_validate({ + "path": obj.get("path"), + "on_restart": obj.get("on_restart"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type") + }) return _obj + + diff --git a/saturn_api/models/external_repo_create.py b/saturn_api/models/external_repo_create.py index 398162b..b76d2f2 100644 --- a/saturn_api/models/external_repo_create.py +++ b/saturn_api/models/external_repo_create.py @@ -1,39 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ExternalRepoCreate(BaseModel): """ ExternalRepoCreate - """ # noqa: E501 - + """ # noqa: E501 remote_url: StrictStr = Field(description="Repo URL.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the repository.") - ssh_privatekey_id: Optional[StrictStr] = Field( - default=None, description="ID of an SSH Private Key with permission to pull the repository." - ) + ssh_privatekey_id: Optional[StrictStr] = Field(default=None, description="ID of an SSH Private Key with permission to pull the repository.") __properties: ClassVar[List[str]] = ["remote_url", "owner", "ssh_privatekey_id"] model_config = ConfigDict( @@ -42,6 +38,7 @@ class ExternalRepoCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,11 +73,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # set to None if ssh_privatekey_id (nullable) is None # and model_fields_set contains the field if self.ssh_privatekey_id is None and "ssh_privatekey_id" in self.model_fields_set: - _dict["ssh_privatekey_id"] = None + _dict['ssh_privatekey_id'] = None return _dict @@ -92,13 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "remote_url": obj.get("remote_url"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "ssh_privatekey_id": obj.get("ssh_privatekey_id"), - } - ) + _obj = cls.model_validate({ + "remote_url": obj.get("remote_url"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "ssh_privatekey_id": obj.get("ssh_privatekey_id") + }) return _obj + + diff --git a/saturn_api/models/external_repo_list.py b/saturn_api/models/external_repo_list.py index 59c3f27..bedaa1e 100644 --- a/saturn_api/models/external_repo_list.py +++ b/saturn_api/models/external_repo_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.external_repo import ExternalRepo - +from typing import Literal, Optional, Set +from typing_extensions import Self class ExternalRepoList(BaseModel): """ ExternalRepoList - """ # noqa: E501 - + """ # noqa: E501 external_repos: List[ExternalRepo] = Field(description="List of external repositories.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ExternalRepoList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "external_repos", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "external_repos", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repos in self.external_repos: if _item_external_repos: _items.append(_item_external_repos.to_dict()) - _dict["external_repos"] = _items + _dict['external_repos'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "external_repos": ( - [ExternalRepo.from_dict(_item) for _item in obj["external_repos"]] - if obj.get("external_repos") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "external_repos": [ExternalRepo.from_dict(_item) for _item in obj["external_repos"]] if obj.get("external_repos") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/external_repo_update.py b/saturn_api/models/external_repo_update.py index 1be85f6..2e7153f 100644 --- a/saturn_api/models/external_repo_update.py +++ b/saturn_api/models/external_repo_update.py @@ -1,36 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExternalRepoUpdate(BaseModel): """ ExternalRepoUpdate - """ # noqa: E501 - + """ # noqa: E501 remote_url: Optional[StrictStr] = Field(default=None, description="Repository URL.") - ssh_privatekey_id: Optional[StrictStr] = Field( - default=None, description="ID of an SSH Private Key with permission to pull the repository." - ) + ssh_privatekey_id: Optional[StrictStr] = Field(default=None, description="ID of an SSH Private Key with permission to pull the repository.") __properties: ClassVar[List[str]] = ["remote_url", "ssh_privatekey_id"] model_config = ConfigDict( @@ -39,6 +36,7 @@ class ExternalRepoUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if ssh_privatekey_id (nullable) is None # and model_fields_set contains the field if self.ssh_privatekey_id is None and "ssh_privatekey_id" in self.model_fields_set: - _dict["ssh_privatekey_id"] = None + _dict['ssh_privatekey_id'] = None return _dict @@ -86,7 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"remote_url": obj.get("remote_url"), "ssh_privatekey_id": obj.get("ssh_privatekey_id")} - ) + _obj = cls.model_validate({ + "remote_url": obj.get("remote_url"), + "ssh_privatekey_id": obj.get("ssh_privatekey_id") + }) return _obj + + diff --git a/saturn_api/models/extra_packages.py b/saturn_api/models/extra_packages.py index 7b2783a..ccda484 100644 --- a/saturn_api/models/extra_packages.py +++ b/saturn_api/models/extra_packages.py @@ -1,60 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExtraPackages(BaseModel): """ ExtraPackages - """ # noqa: E501 - + """ # noqa: E501 pip: Optional[StrictStr] = Field(default=None, description="Pip packages to install.") - as_requirements_txt: Optional[StrictBool] = Field( - default=False, description="True if pip field is formatted as requirements.txt" - ) + as_requirements_txt: Optional[StrictBool] = Field(default=False, description="True if pip field is formatted as requirements.txt") conda: Optional[StrictStr] = Field(default=None, description="Conda packages to install") - as_environment_yml: Optional[StrictBool] = Field( - default=False, description="True if conda field is formatted as environment.yaml" - ) + as_environment_yml: Optional[StrictBool] = Field(default=False, description="True if conda field is formatted as environment.yaml") apt: Optional[StrictStr] = Field(default=None, description="Apt packages to install.") cran: Optional[StrictStr] = Field(default=None, description="Cran packages to install.") remotes: Optional[StrictStr] = Field(default=None, description="Remotes packages to install.") - bioconductor: Optional[StrictStr] = Field( - default=None, description="Bioconductor packages to install." - ) - use_mamba: Optional[StrictBool] = Field( - default=False, description="Enable installing conda packages with mamba." - ) - __properties: ClassVar[List[str]] = [ - "pip", - "as_requirements_txt", - "conda", - "as_environment_yml", - "apt", - "cran", - "remotes", - "bioconductor", - "use_mamba", - ] + bioconductor: Optional[StrictStr] = Field(default=None, description="Bioconductor packages to install.") + use_mamba: Optional[StrictBool] = Field(default=False, description="Enable installing conda packages with mamba.") + __properties: ClassVar[List[str]] = ["pip", "as_requirements_txt", "conda", "as_environment_yml", "apt", "cran", "remotes", "bioconductor", "use_mamba"] model_config = ConfigDict( populate_by_name=True, @@ -62,6 +43,7 @@ class ExtraPackages(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,32 +79,32 @@ def to_dict(self) -> Dict[str, Any]: # set to None if pip (nullable) is None # and model_fields_set contains the field if self.pip is None and "pip" in self.model_fields_set: - _dict["pip"] = None + _dict['pip'] = None # set to None if conda (nullable) is None # and model_fields_set contains the field if self.conda is None and "conda" in self.model_fields_set: - _dict["conda"] = None + _dict['conda'] = None # set to None if apt (nullable) is None # and model_fields_set contains the field if self.apt is None and "apt" in self.model_fields_set: - _dict["apt"] = None + _dict['apt'] = None # set to None if cran (nullable) is None # and model_fields_set contains the field if self.cran is None and "cran" in self.model_fields_set: - _dict["cran"] = None + _dict['cran'] = None # set to None if remotes (nullable) is None # and model_fields_set contains the field if self.remotes is None and "remotes" in self.model_fields_set: - _dict["remotes"] = None + _dict['remotes'] = None # set to None if bioconductor (nullable) is None # and model_fields_set contains the field if self.bioconductor is None and "bioconductor" in self.model_fields_set: - _dict["bioconductor"] = None + _dict['bioconductor'] = None return _dict @@ -134,25 +117,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pip": obj.get("pip"), - "as_requirements_txt": ( - obj.get("as_requirements_txt") - if obj.get("as_requirements_txt") is not None - else False - ), - "conda": obj.get("conda"), - "as_environment_yml": ( - obj.get("as_environment_yml") - if obj.get("as_environment_yml") is not None - else False - ), - "apt": obj.get("apt"), - "cran": obj.get("cran"), - "remotes": obj.get("remotes"), - "bioconductor": obj.get("bioconductor"), - "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, - } - ) + _obj = cls.model_validate({ + "pip": obj.get("pip"), + "as_requirements_txt": obj.get("as_requirements_txt") if obj.get("as_requirements_txt") is not None else False, + "conda": obj.get("conda"), + "as_environment_yml": obj.get("as_environment_yml") if obj.get("as_environment_yml") is not None else False, + "apt": obj.get("apt"), + "cran": obj.get("cran"), + "remotes": obj.get("remotes"), + "bioconductor": obj.get("bioconductor"), + "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False + }) return _obj + + diff --git a/saturn_api/models/extra_packages_recipe.py b/saturn_api/models/extra_packages_recipe.py index 6387029..dd14b8c 100644 --- a/saturn_api/models/extra_packages_recipe.py +++ b/saturn_api/models/extra_packages_recipe.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.extra_packages_recipe_apt import ExtraPackagesRecipeApt from saturn_api.models.extra_packages_recipe_conda import ExtraPackagesRecipeConda from saturn_api.models.extra_packages_recipe_pip import ExtraPackagesRecipePip - +from typing import Literal, Optional, Set +from typing_extensions import Self class ExtraPackagesRecipe(BaseModel): """ ExtraPackagesRecipe - """ # noqa: E501 - + """ # noqa: E501 pip: Optional[ExtraPackagesRecipePip] = None conda: Optional[ExtraPackagesRecipeConda] = None apt: Optional[ExtraPackagesRecipeApt] = None @@ -45,6 +43,7 @@ class ExtraPackagesRecipe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,22 +78,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of pip if self.pip: - _dict["pip"] = self.pip.to_dict() + _dict['pip'] = self.pip.to_dict() # override the default output from pydantic by calling `to_dict()` of conda if self.conda: - _dict["conda"] = self.conda.to_dict() + _dict['conda'] = self.conda.to_dict() # override the default output from pydantic by calling `to_dict()` of apt if self.apt: - _dict["apt"] = self.apt.to_dict() + _dict['apt'] = self.apt.to_dict() # override the default output from pydantic by calling `to_dict()` of cran if self.cran: - _dict["cran"] = self.cran.to_dict() + _dict['cran'] = self.cran.to_dict() # override the default output from pydantic by calling `to_dict()` of remotes if self.remotes: - _dict["remotes"] = self.remotes.to_dict() + _dict['remotes'] = self.remotes.to_dict() # override the default output from pydantic by calling `to_dict()` of bioconductor if self.bioconductor: - _dict["bioconductor"] = self.bioconductor.to_dict() + _dict['bioconductor'] = self.bioconductor.to_dict() return _dict @classmethod @@ -105,38 +105,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pip": ( - ExtraPackagesRecipePip.from_dict(obj["pip"]) - if obj.get("pip") is not None - else None - ), - "conda": ( - ExtraPackagesRecipeConda.from_dict(obj["conda"]) - if obj.get("conda") is not None - else None - ), - "apt": ( - ExtraPackagesRecipeApt.from_dict(obj["apt"]) - if obj.get("apt") is not None - else None - ), - "cran": ( - ExtraPackagesRecipeApt.from_dict(obj["cran"]) - if obj.get("cran") is not None - else None - ), - "remotes": ( - ExtraPackagesRecipeApt.from_dict(obj["remotes"]) - if obj.get("remotes") is not None - else None - ), - "bioconductor": ( - ExtraPackagesRecipeApt.from_dict(obj["bioconductor"]) - if obj.get("bioconductor") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "pip": ExtraPackagesRecipePip.from_dict(obj["pip"]) if obj.get("pip") is not None else None, + "conda": ExtraPackagesRecipeConda.from_dict(obj["conda"]) if obj.get("conda") is not None else None, + "apt": ExtraPackagesRecipeApt.from_dict(obj["apt"]) if obj.get("apt") is not None else None, + "cran": ExtraPackagesRecipeApt.from_dict(obj["cran"]) if obj.get("cran") is not None else None, + "remotes": ExtraPackagesRecipeApt.from_dict(obj["remotes"]) if obj.get("remotes") is not None else None, + "bioconductor": ExtraPackagesRecipeApt.from_dict(obj["bioconductor"]) if obj.get("bioconductor") is not None else None + }) return _obj + + diff --git a/saturn_api/models/extra_packages_recipe_apt.py b/saturn_api/models/extra_packages_recipe_apt.py index f824ece..06ae572 100644 --- a/saturn_api/models/extra_packages_recipe_apt.py +++ b/saturn_api/models/extra_packages_recipe_apt.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExtraPackagesRecipeApt(BaseModel): """ ExtraPackagesRecipeApt - """ # noqa: E501 - + """ # noqa: E501 install: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["install"] @@ -36,6 +35,7 @@ class ExtraPackagesRecipeApt(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"install": obj.get("install")}) + _obj = cls.model_validate({ + "install": obj.get("install") + }) return _obj + + diff --git a/saturn_api/models/extra_packages_recipe_conda.py b/saturn_api/models/extra_packages_recipe_conda.py index 8c575eb..6fda134 100644 --- a/saturn_api/models/extra_packages_recipe_conda.py +++ b/saturn_api/models/extra_packages_recipe_conda.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExtraPackagesRecipeConda(BaseModel): """ ExtraPackagesRecipeConda - """ # noqa: E501 - + """ # noqa: E501 install: Optional[StrictStr] = None environment_yml: Optional[StrictStr] = None use_mamba: Optional[StrictBool] = False @@ -38,6 +37,7 @@ class ExtraPackagesRecipeConda(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,11 +81,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "install": obj.get("install"), - "environment_yml": obj.get("environment_yml"), - "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, - } - ) + _obj = cls.model_validate({ + "install": obj.get("install"), + "environment_yml": obj.get("environment_yml"), + "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False + }) return _obj + + diff --git a/saturn_api/models/extra_packages_recipe_pip.py b/saturn_api/models/extra_packages_recipe_pip.py index ee24a4f..c8f5825 100644 --- a/saturn_api/models/extra_packages_recipe_pip.py +++ b/saturn_api/models/extra_packages_recipe_pip.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ExtraPackagesRecipePip(BaseModel): """ ExtraPackagesRecipePip - """ # noqa: E501 - + """ # noqa: E501 install: Optional[StrictStr] = None requirements_txt: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["install", "requirements_txt"] @@ -37,6 +36,7 @@ class ExtraPackagesRecipePip(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,7 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"install": obj.get("install"), "requirements_txt": obj.get("requirements_txt")} - ) + _obj = cls.model_validate({ + "install": obj.get("install"), + "requirements_txt": obj.get("requirements_txt") + }) return _obj + + diff --git a/saturn_api/models/group.py b/saturn_api/models/group.py index f0588e1..de4344d 100644 --- a/saturn_api/models/group.py +++ b/saturn_api/models/group.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class Group(BaseModel): """ Group - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the group.") groupname: StrictStr = Field(description="Name of the group.") created_at: StrictStr = Field(description="Creation timestamp.") @@ -36,17 +35,7 @@ class Group(BaseModel): org_id: StrictStr = Field(description="Org ID that the group belongs to.") org_name: StrictStr = Field(description="Org name that the group belongs to.") org_admin: StrictBool = Field(description="Enable group to take privileged actions on its org.") - __properties: ClassVar[List[str]] = [ - "id", - "groupname", - "created_at", - "description", - "avatar_url", - "is_multiple_ssh_keys", - "org_id", - "org_name", - "org_admin", - ] + __properties: ClassVar[List[str]] = ["id", "groupname", "created_at", "description", "avatar_url", "is_multiple_ssh_keys", "org_id", "org_name", "org_admin"] model_config = ConfigDict( populate_by_name=True, @@ -54,6 +43,7 @@ class Group(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,19 +77,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "groupname", - "created_at", - "description", - "avatar_url", - "is_multiple_ssh_keys", - "org_id", - "org_name", - "org_admin", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "groupname", + "created_at", + "description", + "avatar_url", + "is_multiple_ssh_keys", + "org_id", + "org_name", + "org_admin", + ]) _dict = self.model_dump( by_alias=True, @@ -117,17 +105,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "groupname": obj.get("groupname"), - "created_at": obj.get("created_at"), - "description": obj.get("description"), - "avatar_url": obj.get("avatar_url"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "org_id": obj.get("org_id"), - "org_name": obj.get("org_name"), - "org_admin": obj.get("org_admin"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "groupname": obj.get("groupname"), + "created_at": obj.get("created_at"), + "description": obj.get("description"), + "avatar_url": obj.get("avatar_url"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "org_admin": obj.get("org_admin") + }) return _obj + + diff --git a/saturn_api/models/group_create.py b/saturn_api/models/group_create.py index b063e4f..d310961 100644 --- a/saturn_api/models/group_create.py +++ b/saturn_api/models/group_create.py @@ -1,51 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class GroupCreate(BaseModel): """ GroupCreate - """ # noqa: E501 - + """ # noqa: E501 groupname: StrictStr = Field(description="Name of the group.") - org_id: Optional[StrictStr] = Field( - default=None, - description="Org ID that the group belongs to. Defaults to the default org for the authenticated user.", - ) + org_id: Optional[StrictStr] = Field(default=None, description="Org ID that the group belongs to. Defaults to the default org for the authenticated user.") description: Optional[StrictStr] = Field(default=None, description="Description of the group.") - is_multiple_ssh_keys: Optional[StrictBool] = Field( - default=False, description="Enable multiple SSH keys." - ) - org_admin: Optional[StrictBool] = Field( - default=False, description="Enable group to take privileged actions on its org." - ) - __properties: ClassVar[List[str]] = [ - "groupname", - "org_id", - "description", - "is_multiple_ssh_keys", - "org_admin", - ] + is_multiple_ssh_keys: Optional[StrictBool] = Field(default=False, description="Enable multiple SSH keys.") + org_admin: Optional[StrictBool] = Field(default=False, description="Enable group to take privileged actions on its org.") + __properties: ClassVar[List[str]] = ["groupname", "org_id", "description", "is_multiple_ssh_keys", "org_admin"] model_config = ConfigDict( populate_by_name=True, @@ -53,6 +39,7 @@ class GroupCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if org_id (nullable) is None # and model_fields_set contains the field if self.org_id is None and "org_id" in self.model_fields_set: - _dict["org_id"] = None + _dict['org_id'] = None return _dict @@ -100,17 +88,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groupname": obj.get("groupname"), - "org_id": obj.get("org_id"), - "description": obj.get("description"), - "is_multiple_ssh_keys": ( - obj.get("is_multiple_ssh_keys") - if obj.get("is_multiple_ssh_keys") is not None - else False - ), - "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False, - } - ) + _obj = cls.model_validate({ + "groupname": obj.get("groupname"), + "org_id": obj.get("org_id"), + "description": obj.get("description"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys") if obj.get("is_multiple_ssh_keys") is not None else False, + "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False + }) return _obj + + diff --git a/saturn_api/models/group_list.py b/saturn_api/models/group_list.py index c8060d4..b8a24d4 100644 --- a/saturn_api/models/group_list.py +++ b/saturn_api/models/group_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.group import Group - +from typing import Literal, Optional, Set +from typing_extensions import Self class GroupList(BaseModel): """ GroupList - """ # noqa: E501 - + """ # noqa: E501 groups: List[Group] = Field(description="List of groups.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class GroupList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "groups", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "groups", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_groups in self.groups: if _item_groups: _items.append(_item_groups.to_dict()) - _dict["groups"] = _items + _dict['groups'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groups": ( - [Group.from_dict(_item) for _item in obj["groups"]] - if obj.get("groups") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "groups": [Group.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/group_member.py b/saturn_api/models/group_member.py index c67a66c..d336f08 100644 --- a/saturn_api/models/group_member.py +++ b/saturn_api/models/group_member.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class GroupMember(BaseModel): """ GroupMember - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the group member") created_at: StrictStr = Field(description="Creation timestamp.") user_id: StrictStr = Field(description="User ID of the group member.") @@ -39,6 +38,7 @@ class GroupMember(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,14 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "user_id", - "group_id", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "user_id", + "group_id", + ]) _dict = self.model_dump( by_alias=True, @@ -92,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id") + }) return _obj + + diff --git a/saturn_api/models/group_member_create.py b/saturn_api/models/group_member_create.py index aee4699..40daa89 100644 --- a/saturn_api/models/group_member_create.py +++ b/saturn_api/models/group_member_create.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class GroupMemberCreate(BaseModel): """ GroupMemberCreate - """ # noqa: E501 - + """ # noqa: E501 user_id: StrictStr = Field(description="User ID to add to the group.") __properties: ClassVar[List[str]] = ["user_id"] @@ -36,6 +35,7 @@ class GroupMemberCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"user_id": obj.get("user_id")}) + _obj = cls.model_validate({ + "user_id": obj.get("user_id") + }) return _obj + + diff --git a/saturn_api/models/group_member_list.py b/saturn_api/models/group_member_list.py index f945a1f..97a3fb9 100644 --- a/saturn_api/models/group_member_list.py +++ b/saturn_api/models/group_member_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.user import User - +from typing import Literal, Optional, Set +from typing_extensions import Self class GroupMemberList(BaseModel): """ GroupMemberList - """ # noqa: E501 - + """ # noqa: E501 users: List[User] = Field(description="List of users.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class GroupMemberList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "users", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "users", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_users in self.users: if _item_users: _items.append(_item_users.to_dict()) - _dict["users"] = _items + _dict['users'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "users": ( - [User.from_dict(_item) for _item in obj["users"]] - if obj.get("users") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/group_update.py b/saturn_api/models/group_update.py index a07ee62..1e1d4d9 100644 --- a/saturn_api/models/group_update.py +++ b/saturn_api/models/group_update.py @@ -1,46 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class GroupUpdate(BaseModel): """ GroupUpdate - """ # noqa: E501 - + """ # noqa: E501 groupname: Optional[StrictStr] = Field(default=None, description="Name of the group.") description: Optional[StrictStr] = Field(default=None, description="Description of the group.") - is_multiple_ssh_keys: Optional[StrictBool] = Field( - default=None, description="Enable multiple SSH keys." - ) - org_admin: Optional[StrictBool] = Field( - default=None, description="Enable group to take privileged actions on its org." - ) - __properties: ClassVar[List[str]] = [ - "groupname", - "description", - "is_multiple_ssh_keys", - "org_admin", - ] + is_multiple_ssh_keys: Optional[StrictBool] = Field(default=None, description="Enable multiple SSH keys.") + org_admin: Optional[StrictBool] = Field(default=None, description="Enable group to take privileged actions on its org.") + __properties: ClassVar[List[str]] = ["groupname", "description", "is_multiple_ssh_keys", "org_admin"] model_config = ConfigDict( populate_by_name=True, @@ -48,6 +38,7 @@ class GroupUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,12 +82,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groupname": obj.get("groupname"), - "description": obj.get("description"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "org_admin": obj.get("org_admin"), - } - ) + _obj = cls.model_validate({ + "groupname": obj.get("groupname"), + "description": obj.get("description"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "org_admin": obj.get("org_admin") + }) return _obj + + diff --git a/saturn_api/models/hardware_type.py b/saturn_api/models/hardware_type.py index 856654e..1dda3dc 100644 --- a/saturn_api/models/hardware_type.py +++ b/saturn_api/models/hardware_type.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class HardwareType(str, Enum): """ allowed enum values """ - CPU = "CPU" - NVIDIA = "NVIDIA" - AMD = "AMD" + CPU = 'CPU' + NVIDIA = 'NVIDIA' + AMD = 'AMD' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of HardwareType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/historic_log.py b/saturn_api/models/historic_log.py index 597a4dc..6c144c5 100644 --- a/saturn_api/models/historic_log.py +++ b/saturn_api/models/historic_log.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class HistoricLog(BaseModel): """ HistoricLog - """ # noqa: E501 - + """ # noqa: E501 timestamp: StrictStr = Field(description="Log timestamp.") content: StrictStr = Field(description="Content of the log.") pod_name: StrictStr = Field(description="Name of the pod the log came from.") @@ -39,6 +38,7 @@ class HistoricLog(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,14 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "timestamp", - "content", - "pod_name", - "container_name", - ] - ) + excluded_fields: Set[str] = set([ + "timestamp", + "content", + "pod_name", + "container_name", + ]) _dict = self.model_dump( by_alias=True, @@ -92,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "timestamp": obj.get("timestamp"), - "content": obj.get("content"), - "pod_name": obj.get("pod_name"), - "container_name": obj.get("container_name"), - } - ) + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "content": obj.get("content"), + "pod_name": obj.get("pod_name"), + "container_name": obj.get("container_name") + }) return _obj + + diff --git a/saturn_api/models/historic_log_list.py b/saturn_api/models/historic_log_list.py index ab285b6..b5890e4 100644 --- a/saturn_api/models/historic_log_list.py +++ b/saturn_api/models/historic_log_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.historic_log import HistoricLog - +from typing import Literal, Optional, Set +from typing_extensions import Self class HistoricLogList(BaseModel): """ HistoricLogList - """ # noqa: E501 - + """ # noqa: E501 logs: List[HistoricLog] = Field(description="List of logs.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class HistoricLogList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "logs", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "logs", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_logs in self.logs: if _item_logs: _items.append(_item_logs.to_dict()) - _dict["logs"] = _items + _dict['logs'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "logs": ( - [HistoricLog.from_dict(_item) for _item in obj["logs"]] - if obj.get("logs") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "logs": [HistoricLog.from_dict(_item) for _item in obj["logs"]] if obj.get("logs") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/identity.py b/saturn_api/models/identity.py index 19ea4b4..c20caf7 100644 --- a/saturn_api/models/identity.py +++ b/saturn_api/models/identity.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.identity_type import IdentityType - +from typing import Literal, Optional, Set +from typing_extensions import Self class Identity(BaseModel): """ Identity - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the user or group.") avatar_url: StrictStr = Field(description="Avatar URL for the user or group.") created_at: StrictStr = Field(description="Creation timestamp.") @@ -42,6 +40,7 @@ class Identity(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,14 +69,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "avatar_url", - "created_at", - "name", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "avatar_url", + "created_at", + "name", + ]) _dict = self.model_dump( by_alias=True, @@ -95,13 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "avatar_url": obj.get("avatar_url"), - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "identity_type": obj.get("identity_type"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "avatar_url": obj.get("avatar_url"), + "created_at": obj.get("created_at"), + "name": obj.get("name"), + "identity_type": obj.get("identity_type") + }) return _obj + + diff --git a/saturn_api/models/identity_by_group_id.py b/saturn_api/models/identity_by_group_id.py index f198838..949f42f 100644 --- a/saturn_api/models/identity_by_group_id.py +++ b/saturn_api/models/identity_by_group_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class IdentityByGroupId(BaseModel): """ IdentityByGroupId - """ # noqa: E501 - + """ # noqa: E501 group_id: StrictStr = Field(description="Identity reference by group ID") __properties: ClassVar[List[str]] = ["group_id"] @@ -36,6 +35,7 @@ class IdentityByGroupId(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"group_id": obj.get("group_id")}) + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) return _obj + + diff --git a/saturn_api/models/identity_by_user_id.py b/saturn_api/models/identity_by_user_id.py index 5fe5525..323113c 100644 --- a/saturn_api/models/identity_by_user_id.py +++ b/saturn_api/models/identity_by_user_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class IdentityByUserId(BaseModel): """ IdentityByUserId - """ # noqa: E501 - + """ # noqa: E501 user_id: StrictStr = Field(description="Identity reference by user ID") __properties: ClassVar[List[str]] = ["user_id"] @@ -36,6 +35,7 @@ class IdentityByUserId(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"user_id": obj.get("user_id")}) + _obj = cls.model_validate({ + "user_id": obj.get("user_id") + }) return _obj + + diff --git a/saturn_api/models/identity_reference.py b/saturn_api/models/identity_reference.py index e4ffee0..e84590d 100644 --- a/saturn_api/models/identity_reference.py +++ b/saturn_api/models/identity_reference.py @@ -1,52 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Annotated, Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated from saturn_api.models.identity_by_group_id import IdentityByGroupId from saturn_api.models.identity_by_user_id import IdentityByUserId +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar IDENTITYREFERENCE_ONE_OF_SCHEMAS = ["IdentityByGroupId", "IdentityByUserId", "str"] -T = TypeVar( - "T", - IdentityByGroupId, - IdentityByUserId, - str, - default=Union[IdentityByGroupId, IdentityByUserId, str], -) - +T = TypeVar("T", IdentityByGroupId, IdentityByUserId, str, default=Union[IdentityByGroupId, IdentityByUserId, str]) class IdentityReference(RootModel[T]): """ IdentityReference """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -83,3 +68,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/identity_type.py b/saturn_api/models/identity_type.py index 851e85f..3e023fb 100644 --- a/saturn_api/models/identity_type.py +++ b/saturn_api/models/identity_type.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,10 +26,12 @@ class IdentityType(str, Enum): """ allowed enum values """ - USER = "user" - GROUP = "group" + USER = 'user' + GROUP = 'group' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of IdentityType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/image.py b/saturn_api/models/image.py index 55530af..9b9a75a 100644 --- a/saturn_api/models/image.py +++ b/saturn_api/models/image.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image_access_level import ImageAccessLevel from saturn_api.models.owner import Owner - +from typing import Literal, Optional, Set +from typing_extensions import Self class Image(BaseModel): """ Image - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the image.") name: StrictStr = Field(description="Name of the image.") owner: Owner = Field(description="Owner of the image.") @@ -42,19 +40,7 @@ class Image(BaseModel): is_base: StrictBool = Field(description="True if the image is a base image for builds.") is_gpu: StrictBool = Field(description="True if the image support GPU hardware.") trusted: StrictBool = Field(description="True if the image belongs to a trusted source.") - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "description", - "created_at", - "hardware_type", - "supports", - "access", - "is_base", - "is_gpu", - "trusted", - ] + __properties: ClassVar[List[str]] = ["id", "name", "owner", "description", "created_at", "hardware_type", "supports", "access", "is_base", "is_gpu", "trusted"] model_config = ConfigDict( populate_by_name=True, @@ -62,6 +48,7 @@ class Image(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -95,19 +82,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "description", - "created_at", - "supports", - "is_base", - "is_gpu", - "trusted", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "description", + "created_at", + "supports", + "is_base", + "is_gpu", + "trusted", + ]) _dict = self.model_dump( by_alias=True, @@ -116,7 +101,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -128,19 +113,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "hardware_type": obj.get("hardware_type"), - "supports": obj.get("supports"), - "access": obj.get("access"), - "is_base": obj.get("is_base"), - "is_gpu": obj.get("is_gpu"), - "trusted": obj.get("trusted"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "hardware_type": obj.get("hardware_type"), + "supports": obj.get("supports"), + "access": obj.get("access"), + "is_base": obj.get("is_base"), + "is_gpu": obj.get("is_gpu"), + "trusted": obj.get("trusted") + }) return _obj + + diff --git a/saturn_api/models/image_access_level.py b/saturn_api/models/image_access_level.py index 234733f..8553fbc 100644 --- a/saturn_api/models/image_access_level.py +++ b/saturn_api/models/image_access_level.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class ImageAccessLevel(str, Enum): """ allowed enum values """ - ACCOUNT = "account" - ORG = "org" - OWNER = "owner" + ACCOUNT = 'account' + ORG = 'org' + OWNER = 'owner' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ImageAccessLevel from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/image_build_status.py b/saturn_api/models/image_build_status.py index 6e3b6f7..17dce57 100644 --- a/saturn_api/models/image_build_status.py +++ b/saturn_api/models/image_build_status.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,13 +26,15 @@ class ImageBuildStatus(str, Enum): """ allowed enum values """ - BUILT = "built" - BUILDING = "building" - ERROR = "error" - PENDING = "pending" - STOPPING = "stopping" + BUILT = 'built' + BUILDING = 'building' + ERROR = 'error' + PENDING = 'pending' + STOPPING = 'stopping' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ImageBuildStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/image_create.py b/saturn_api/models/image_create.py index 06a419f..f406df4 100644 --- a/saturn_api/models/image_create.py +++ b/saturn_api/models/image_create.py @@ -1,50 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image_access_level import ImageAccessLevel from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageCreate(BaseModel): """ ImageCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the image.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the image.") - description: Optional[StrictStr] = Field(default="", description="Description of the image.") + description: Optional[StrictStr] = Field(default='', description="Description of the image.") hardware_type: Optional[HardwareType] = None supports: Optional[List[StrictStr]] = Field(default=None, description="Supported features.") access: Optional[ImageAccessLevel] = None - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "hardware_type", - "supports", - "access", - ] + __properties: ClassVar[List[str]] = ["name", "owner", "description", "hardware_type", "supports", "access"] model_config = ConfigDict( populate_by_name=True, @@ -52,6 +43,7 @@ class ImageCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,11 +78,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict["description"] = None + _dict['description'] = None return _dict @@ -102,16 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description") if obj.get("description") is not None else "", - "hardware_type": obj.get("hardware_type"), - "supports": obj.get("supports"), - "access": obj.get("access"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description") if obj.get("description") is not None else '', + "hardware_type": obj.get("hardware_type"), + "supports": obj.get("supports"), + "access": obj.get("access") + }) return _obj + + diff --git a/saturn_api/models/image_list.py b/saturn_api/models/image_list.py index 45817f7..74fe5fc 100644 --- a/saturn_api/models/image_list.py +++ b/saturn_api/models/image_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.image import Image - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageList(BaseModel): """ ImageList - """ # noqa: E501 - + """ # noqa: E501 images: List[Image] = Field(description="List of images.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ImageList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "images", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "images", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_images in self.images: if _item_images: _items.append(_item_images.to_dict()) - _dict["images"] = _items + _dict['images'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "images": ( - [Image.from_dict(_item) for _item in obj["images"]] - if obj.get("images") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "images": [Image.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/image_recipe.py b/saturn_api/models/image_recipe.py index 17ba781..07fa122 100644 --- a/saturn_api/models/image_recipe.py +++ b/saturn_api/models/image_recipe.py @@ -1,45 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.image_spec import ImageSpec from saturn_api.models.image_state import ImageState - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageRecipe(BaseModel): """ ImageRecipe - """ # noqa: E501 - - schema_version: Optional[StrictStr] = "2025.10.01" - type: Literal["image"] + """ # noqa: E501 + schema_version: Optional[StrictStr] = '2025.10.01' + type: Literal['image'] spec: ImageSpec state: Optional[ImageState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator("type") + @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["image"]): + if value not in set(['image']): raise ValueError("must be one of enum values ('image')") return value @@ -49,6 +47,7 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,11 +73,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "state", - ] - ) + excluded_fields: Set[str] = set([ + "state", + ]) _dict = self.model_dump( by_alias=True, @@ -87,10 +84,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict["spec"] = self.spec.to_dict() + _dict['spec'] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() return _dict @classmethod @@ -102,18 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schema_version": ( - obj.get("schema_version") - if obj.get("schema_version") is not None - else "2025.10.01" - ), - "type": obj.get("type"), - "spec": ImageSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, - "state": ( - ImageState.from_dict(obj["state"]) if obj.get("state") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', + "type": obj.get("type"), + "spec": ImageSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "state": ImageState.from_dict(obj["state"]) if obj.get("state") is not None else None + }) return _obj + + diff --git a/saturn_api/models/image_spec.py b/saturn_api/models/image_spec.py index 0883766..263d51a 100644 --- a/saturn_api/models/image_spec.py +++ b/saturn_api/models/image_spec.py @@ -1,69 +1,59 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.image_tag_recipe import ImageTagRecipe from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageSpec(BaseModel): """ ImageSpec - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr owner: Optional[OwnerReference] = None - description: Optional[StrictStr] = "" + description: Optional[StrictStr] = '' versions: Optional[List[ImageTagRecipe]] = None - hardware_type: Literal["CPU", "NVIDIA", "AMD"] = "CPU" + hardware_type: Literal['CPU', 'NVIDIA', 'AMD'] = 'CPU' supports: Optional[List[StrictStr]] = None - access: Literal["account", "org", "owner"] | None = None - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "versions", - "hardware_type", - "supports", - "access", - ] - - @field_validator("hardware_type") + access: Literal['account', 'org', 'owner'] | None = None + __properties: ClassVar[List[str]] = ["name", "owner", "description", "versions", "hardware_type", "supports", "access"] + + @field_validator('hardware_type') def hardware_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["CPU", "NVIDIA", "AMD"]): + if value not in set(['CPU', 'NVIDIA', 'AMD']): raise ValueError("must be one of enum values ('CPU', 'NVIDIA', 'AMD')") return value - @field_validator("access") + @field_validator('access') def access_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["account", "org", "owner"]): + if value not in set(['account', 'org', 'owner']): raise ValueError("must be one of enum values ('account', 'org', 'owner')") return value @@ -73,6 +63,7 @@ def access_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -97,7 +88,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -106,14 +98,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in versions (list) _items = [] if self.versions: for _item_versions in self.versions: if _item_versions: _items.append(_item_versions.to_dict()) - _dict["versions"] = _items + _dict['versions'] = _items return _dict @classmethod @@ -125,23 +117,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description") if obj.get("description") is not None else "", - "versions": ( - [ImageTagRecipe.from_dict(_item) for _item in obj["versions"]] - if obj.get("versions") is not None - else None - ), - "hardware_type": ( - obj.get("hardware_type") if obj.get("hardware_type") is not None else "CPU" - ), - "supports": obj.get("supports"), - "access": obj.get("access"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description") if obj.get("description") is not None else '', + "versions": [ImageTagRecipe.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None, + "hardware_type": obj.get("hardware_type") if obj.get("hardware_type") is not None else 'CPU', + "supports": obj.get("supports"), + "access": obj.get("access") + }) return _obj + + diff --git a/saturn_api/models/image_state.py b/saturn_api/models/image_state.py index 9ea0be7..16f7370 100644 --- a/saturn_api/models/image_state.py +++ b/saturn_api/models/image_state.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.image_tag_state import ImageTagState - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageState(BaseModel): """ ImageState - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr action: Optional[StrictStr] = None versions: Optional[List[ImageTagState]] = None @@ -40,6 +38,7 @@ class ImageState(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "action", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "action", + ]) _dict = self.model_dump( by_alias=True, @@ -84,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_versions in self.versions: if _item_versions: _items.append(_item_versions.to_dict()) - _dict["versions"] = _items + _dict['versions'] = _items return _dict @classmethod @@ -96,15 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "action": obj.get("action"), - "versions": ( - [ImageTagState.from_dict(_item) for _item in obj["versions"]] - if obj.get("versions") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action"), + "versions": [ImageTagState.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None + }) return _obj + + diff --git a/saturn_api/models/image_tag.py b/saturn_api/models/image_tag.py index d577a56..9168d07 100644 --- a/saturn_api/models/image_tag.py +++ b/saturn_api/models/image_tag.py @@ -1,67 +1,46 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.build_data import BuildData from saturn_api.models.image import Image - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageTag(BaseModel): """ ImageTag - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the image tag.") created_at: StrictStr = Field(description="Creation timestamp.") image: Image = Field(description="Image that the tag belongs to.") image_uri: StrictStr = Field(description="Image URI for the tag.") description: StrictStr = Field(description="Description of the image tag") - version: Annotated[str, Field(min_length=1, strict=True)] = Field( - description="Version of the image tag." - ) - build_data: Optional[BuildData] = Field( - default=None, description="Build data for the image tag." - ) - archived: StrictBool = Field( - description="True if the image tag is archived. Archived tags are not attachable to new resources, but will continue to work on existing resources." - ) - is_external: StrictBool = Field( - description="True if the image tag was imported from an external source." - ) + version: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Version of the image tag.") + build_data: Optional[BuildData] = Field(default=None, description="Build data for the image tag.") + archived: StrictBool = Field(description="True if the image tag is archived. Archived tags are not attachable to new resources, but will continue to work on existing resources.") + is_external: StrictBool = Field(description="True if the image tag was imported from an external source.") status: StrictStr = Field(description="Status of the image tag build.") saturn_env: Optional[StrictStr] = Field(default=None, description="Dump of the build env.") - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "image", - "image_uri", - "description", - "version", - "build_data", - "archived", - "is_external", - "status", - "saturn_env", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "image", "image_uri", "description", "version", "build_data", "archived", "is_external", "status", "saturn_env"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +48,7 @@ class ImageTag(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -104,21 +84,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "image", - "image_uri", - "description", - "version", - "build_data", - "archived", - "is_external", - "status", - "saturn_env", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "image", + "image_uri", + "description", + "version", + "build_data", + "archived", + "is_external", + "status", + "saturn_env", + ]) _dict = self.model_dump( by_alias=True, @@ -127,10 +105,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict["image"] = self.image.to_dict() + _dict['image'] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of build_data if self.build_data: - _dict["build_data"] = self.build_data.to_dict() + _dict['build_data'] = self.build_data.to_dict() return _dict @classmethod @@ -142,23 +120,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None, - "image_uri": obj.get("image_uri"), - "description": obj.get("description"), - "version": obj.get("version"), - "build_data": ( - BuildData.from_dict(obj["build_data"]) - if obj.get("build_data") is not None - else None - ), - "archived": obj.get("archived"), - "is_external": obj.get("is_external"), - "status": obj.get("status"), - "saturn_env": obj.get("saturn_env"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None, + "image_uri": obj.get("image_uri"), + "description": obj.get("description"), + "version": obj.get("version"), + "build_data": BuildData.from_dict(obj["build_data"]) if obj.get("build_data") is not None else None, + "archived": obj.get("archived"), + "is_external": obj.get("is_external"), + "status": obj.get("status"), + "saturn_env": obj.get("saturn_env") + }) return _obj + + diff --git a/saturn_api/models/image_tag_by_id.py b/saturn_api/models/image_tag_by_id.py index 01a7abc..bace477 100644 --- a/saturn_api/models/image_tag_by_id.py +++ b/saturn_api/models/image_tag_by_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ImageTagById(BaseModel): """ ImageTagById - """ # noqa: E501 - + """ # noqa: E501 tag_id: StrictStr enforce_trusted: Optional[StrictBool] = True __properties: ClassVar[List[str]] = ["tag_id", "enforce_trusted"] @@ -37,6 +36,7 @@ class ImageTagById(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,12 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "tag_id": obj.get("tag_id"), - "enforce_trusted": ( - obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True - ), - } - ) + _obj = cls.model_validate({ + "tag_id": obj.get("tag_id"), + "enforce_trusted": obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True + }) return _obj + + diff --git a/saturn_api/models/image_tag_by_name.py b/saturn_api/models/image_tag_by_name.py index 8241944..616ea3d 100644 --- a/saturn_api/models/image_tag_by_name.py +++ b/saturn_api/models/image_tag_by_name.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageTagByName(BaseModel): """ ImageTagByName - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr version: StrictStr owner: Optional[OwnerReference] = None @@ -41,6 +39,7 @@ class ImageTagByName(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -86,16 +86,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "version": obj.get("version"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "enforce_trusted": ( - obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "version": obj.get("version"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "enforce_trusted": obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True + }) return _obj + + diff --git a/saturn_api/models/image_tag_by_uri.py b/saturn_api/models/image_tag_by_uri.py index 14cd58d..10c140d 100644 --- a/saturn_api/models/image_tag_by_uri.py +++ b/saturn_api/models/image_tag_by_uri.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageTagByUri(BaseModel): """ ImageTagByUri - """ # noqa: E501 - + """ # noqa: E501 uri: StrictStr owner: Optional[OwnerReference] = None enforce_trusted: Optional[StrictBool] = True @@ -40,6 +38,7 @@ class ImageTagByUri(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -85,15 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "uri": obj.get("uri"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "enforce_trusted": ( - obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True - ), - } - ) + _obj = cls.model_validate({ + "uri": obj.get("uri"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "enforce_trusted": obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True + }) return _obj + + diff --git a/saturn_api/models/image_tag_create.py b/saturn_api/models/image_tag_create.py index e08c63a..cf9b6ea 100644 --- a/saturn_api/models/image_tag_create.py +++ b/saturn_api/models/image_tag_create.py @@ -1,51 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.image_tag_create_build import ImageTagCreateBuild from saturn_api.models.image_tag_create_external import ImageTagCreateExternal +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar IMAGETAGCREATE_ONE_OF_SCHEMAS = ["ImageTagCreateBuild", "ImageTagCreateExternal"] -T = TypeVar( - "T", - ImageTagCreateBuild, - ImageTagCreateExternal, - default=Union[ImageTagCreateBuild, ImageTagCreateExternal], -) - +T = TypeVar("T", ImageTagCreateBuild, ImageTagCreateExternal, default=Union[ImageTagCreateBuild, ImageTagCreateExternal]) class ImageTagCreate(RootModel[T]): """ ImageTagCreate """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -82,3 +67,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/image_tag_create_build.py b/saturn_api/models/image_tag_create_build.py index bf1c425..f65470b 100644 --- a/saturn_api/models/image_tag_create_build.py +++ b/saturn_api/models/image_tag_create_build.py @@ -1,43 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.build_data import BuildData - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageTagCreateBuild(BaseModel): """ ImageTagCreateBuild - """ # noqa: E501 - - version: Annotated[str, Field(min_length=1, strict=True)] = Field( - description="Version of the image tag." - ) - description: Optional[StrictStr] = Field( - default="", description="Description of the image tag." - ) - build_data: Optional[BuildData] = Field( - default=None, description="Build data for the image tag." - ) + """ # noqa: E501 + version: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Version of the image tag.") + description: Optional[StrictStr] = Field(default='', description="Description of the image tag.") + build_data: Optional[BuildData] = Field(default=None, description="Build data for the image tag.") __properties: ClassVar[List[str]] = ["version", "description", "build_data"] model_config = ConfigDict( @@ -46,6 +39,7 @@ class ImageTagCreateBuild(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of build_data if self.build_data: - _dict["build_data"] = self.build_data.to_dict() + _dict['build_data'] = self.build_data.to_dict() return _dict @classmethod @@ -91,15 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "version": obj.get("version"), - "description": obj.get("description") if obj.get("description") is not None else "", - "build_data": ( - BuildData.from_dict(obj["build_data"]) - if obj.get("build_data") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "version": obj.get("version"), + "description": obj.get("description") if obj.get("description") is not None else '', + "build_data": BuildData.from_dict(obj["build_data"]) if obj.get("build_data") is not None else None + }) return _obj + + diff --git a/saturn_api/models/image_tag_create_external.py b/saturn_api/models/image_tag_create_external.py index b23b555..254a0a3 100644 --- a/saturn_api/models/image_tag_create_external.py +++ b/saturn_api/models/image_tag_create_external.py @@ -1,37 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ImageTagCreateExternal(BaseModel): """ ImageTagCreateExternal - """ # noqa: E501 - + """ # noqa: E501 image_uri: StrictStr = Field(description="External image URI") - version: Optional[StrictStr] = Field(default="", description="Version of the image tag.") - description: Optional[StrictStr] = Field( - default="", description="Description of the image tag." - ) + version: Optional[StrictStr] = Field(default='', description="Version of the image tag.") + description: Optional[StrictStr] = Field(default='', description="Description of the image tag.") __properties: ClassVar[List[str]] = ["image_uri", "version", "description"] model_config = ConfigDict( @@ -40,6 +37,7 @@ class ImageTagCreateExternal(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +81,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "image_uri": obj.get("image_uri"), - "version": obj.get("version") if obj.get("version") is not None else "", - "description": obj.get("description") if obj.get("description") is not None else "", - } - ) + _obj = cls.model_validate({ + "image_uri": obj.get("image_uri"), + "version": obj.get("version") if obj.get("version") is not None else '', + "description": obj.get("description") if obj.get("description") is not None else '' + }) return _obj + + diff --git a/saturn_api/models/image_tag_list.py b/saturn_api/models/image_tag_list.py index c260cec..42c2fe9 100644 --- a/saturn_api/models/image_tag_list.py +++ b/saturn_api/models/image_tag_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.image_tag import ImageTag - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageTagList(BaseModel): """ ImageTagList - """ # noqa: E501 - + """ # noqa: E501 image_tags: List[ImageTag] = Field(description="List of image tags.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ImageTagList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "image_tags", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "image_tags", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_image_tags in self.image_tags: if _item_image_tags: _items.append(_item_image_tags.to_dict()) - _dict["image_tags"] = _items + _dict['image_tags'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "image_tags": ( - [ImageTag.from_dict(_item) for _item in obj["image_tags"]] - if obj.get("image_tags") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "image_tags": [ImageTag.from_dict(_item) for _item in obj["image_tags"]] if obj.get("image_tags") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/image_tag_recipe.py b/saturn_api/models/image_tag_recipe.py index 4399b9b..1715161 100644 --- a/saturn_api/models/image_tag_recipe.py +++ b/saturn_api/models/image_tag_recipe.py @@ -1,44 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ImageTagRecipe(BaseModel): """ ImageTagRecipe - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr image_uri: StrictStr description: Optional[StrictStr] = None archived: Optional[StrictBool] = False build_data: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "name", - "image_uri", - "description", - "archived", - "build_data", - ] + __properties: ClassVar[List[str]] = ["name", "image_uri", "description", "archived", "build_data"] model_config = ConfigDict( populate_by_name=True, @@ -46,6 +39,7 @@ class ImageTagRecipe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,13 +83,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "image_uri": obj.get("image_uri"), - "description": obj.get("description"), - "archived": obj.get("archived") if obj.get("archived") is not None else False, - "build_data": obj.get("build_data"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "image_uri": obj.get("image_uri"), + "description": obj.get("description"), + "archived": obj.get("archived") if obj.get("archived") is not None else False, + "build_data": obj.get("build_data") + }) return _obj + + diff --git a/saturn_api/models/image_tag_reference.py b/saturn_api/models/image_tag_reference.py index b99a7ed..7c90806 100644 --- a/saturn_api/models/image_tag_reference.py +++ b/saturn_api/models/image_tag_reference.py @@ -1,54 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.image_tag_by_id import ImageTagById from saturn_api.models.image_tag_by_name import ImageTagByName from saturn_api.models.image_tag_by_uri import ImageTagByUri +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar IMAGETAGREFERENCE_ONE_OF_SCHEMAS = ["ImageTagById", "ImageTagByName", "ImageTagByUri", "str"] -T = TypeVar( - "T", - ImageTagById, - ImageTagByName, - ImageTagByUri, - str, - default=Union[ImageTagById, ImageTagByName, ImageTagByUri, str], -) - +T = TypeVar("T", ImageTagById, ImageTagByName, ImageTagByUri, str, default=Union[ImageTagById, ImageTagByName, ImageTagByUri, str]) class ImageTagReference(RootModel[T]): """ ImageTagReference """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -85,3 +68,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/image_tag_state.py b/saturn_api/models/image_tag_state.py index 4f7bcc1..03099ad 100644 --- a/saturn_api/models/image_tag_state.py +++ b/saturn_api/models/image_tag_state.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ImageTagState(BaseModel): """ ImageTagState - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr action: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "action"] @@ -37,6 +36,7 @@ class ImageTagState(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,12 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "action", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "action", + ]) _dict = self.model_dump( by_alias=True, @@ -86,5 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "action": obj.get("action")}) + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action") + }) return _obj + + diff --git a/saturn_api/models/image_tag_update.py b/saturn_api/models/image_tag_update.py index 94455cd..784d377 100644 --- a/saturn_api/models/image_tag_update.py +++ b/saturn_api/models/image_tag_update.py @@ -1,40 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ImageTagUpdate(BaseModel): """ ImageTagUpdate - """ # noqa: E501 - - description: Optional[StrictStr] = Field( - default=None, description="Description of the image tag." - ) + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Description of the image tag.") version: Optional[StrictStr] = Field(default=None, description="Version of the image tag.") - archived: Optional[StrictBool] = Field( - default=None, - description="Archive the image tag. Archived tags are not attachable to new resources, but will continue to work on existing resources.", - ) + archived: Optional[StrictBool] = Field(default=None, description="Archive the image tag. Archived tags are not attachable to new resources, but will continue to work on existing resources.") __properties: ClassVar[List[str]] = ["description", "version", "archived"] model_config = ConfigDict( @@ -43,6 +37,7 @@ class ImageTagUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,11 +81,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "description": obj.get("description"), - "version": obj.get("version"), - "archived": obj.get("archived"), - } - ) + _obj = cls.model_validate({ + "description": obj.get("description"), + "version": obj.get("version"), + "archived": obj.get("archived") + }) return _obj + + diff --git a/saturn_api/models/image_update.py b/saturn_api/models/image_update.py index 3ad08b7..b866de2 100644 --- a/saturn_api/models/image_update.py +++ b/saturn_api/models/image_update.py @@ -1,47 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image_access_level import ImageAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class ImageUpdate(BaseModel): """ ImageUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the image.") description: Optional[StrictStr] = Field(default=None, description="Description of the image.") hardware_type: Optional[HardwareType] = None supports: Optional[List[StrictStr]] = Field(default=None, description="Supported features.") access: Optional[ImageAccessLevel] = None - __properties: ClassVar[List[str]] = [ - "name", - "description", - "hardware_type", - "supports", - "access", - ] + __properties: ClassVar[List[str]] = ["name", "description", "hardware_type", "supports", "access"] model_config = ConfigDict( populate_by_name=True, @@ -49,6 +41,7 @@ class ImageUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict["description"] = None + _dict['description'] = None return _dict @@ -96,13 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "description": obj.get("description"), - "hardware_type": obj.get("hardware_type"), - "supports": obj.get("supports"), - "access": obj.get("access"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "hardware_type": obj.get("hardware_type"), + "supports": obj.get("supports"), + "access": obj.get("access") + }) return _obj + + diff --git a/saturn_api/models/instance_size.py b/saturn_api/models/instance_size.py index 01defc7..99d7d0d 100644 --- a/saturn_api/models/instance_size.py +++ b/saturn_api/models/instance_size.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set, Union - -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr -from typing_extensions import Self +import json +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union from saturn_api.models.hardware_type import HardwareType - +from typing import Literal, Optional, Set +from typing_extensions import Self class InstanceSize(BaseModel): """ InstanceSize - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr cores: StrictInt memory: StrictStr @@ -39,20 +37,10 @@ class InstanceSize(BaseModel): display: StrictStr display_name: StrictStr price_per_hour: Optional[Union[StrictFloat, StrictInt]] = None - description: Optional[StrictStr] = "" - __properties: ClassVar[List[str]] = [ - "name", - "cores", - "memory", - "gpu", - "gpu_type", - "hardware_type", - "cloud", - "display", - "display_name", - "price_per_hour", - "description", - ] + description: Optional[StrictStr] = '' + disabled: Optional[StrictBool] = False + disabled_message: Optional[StrictStr] = '' + __properties: ClassVar[List[str]] = ["name", "cores", "memory", "gpu", "gpu_type", "hardware_type", "cloud", "display", "display_name", "price_per_hour", "description", "disabled", "disabled_message"] model_config = ConfigDict( populate_by_name=True, @@ -60,6 +48,7 @@ class InstanceSize(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,11 +74,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "display", - ] - ) + excluded_fields: Set[str] = set([ + "display", + ]) _dict = self.model_dump( by_alias=True, @@ -99,12 +86,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if gpu_type (nullable) is None # and model_fields_set contains the field if self.gpu_type is None and "gpu_type" in self.model_fields_set: - _dict["gpu_type"] = None + _dict['gpu_type'] = None # set to None if price_per_hour (nullable) is None # and model_fields_set contains the field if self.price_per_hour is None and "price_per_hour" in self.model_fields_set: - _dict["price_per_hour"] = None + _dict['price_per_hour'] = None return _dict @@ -117,19 +104,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "cores": obj.get("cores"), - "memory": obj.get("memory"), - "gpu": obj.get("gpu") if obj.get("gpu") is not None else 0, - "gpu_type": obj.get("gpu_type"), - "hardware_type": obj.get("hardware_type"), - "cloud": obj.get("cloud"), - "display": obj.get("display"), - "display_name": obj.get("display_name"), - "price_per_hour": obj.get("price_per_hour"), - "description": obj.get("description") if obj.get("description") is not None else "", - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "cores": obj.get("cores"), + "memory": obj.get("memory"), + "gpu": obj.get("gpu") if obj.get("gpu") is not None else 0, + "gpu_type": obj.get("gpu_type"), + "hardware_type": obj.get("hardware_type"), + "cloud": obj.get("cloud"), + "display": obj.get("display"), + "display_name": obj.get("display_name"), + "price_per_hour": obj.get("price_per_hour"), + "description": obj.get("description") if obj.get("description") is not None else '', + "disabled": obj.get("disabled") if obj.get("disabled") is not None else False, + "disabled_message": obj.get("disabled_message") if obj.get("disabled_message") is not None else '' + }) return _obj + + diff --git a/saturn_api/models/invitation.py b/saturn_api/models/invitation.py index f782667..eaf9fa4 100644 --- a/saturn_api/models/invitation.py +++ b/saturn_api/models/invitation.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.user import User - +from typing import Literal, Optional, Set +from typing_extensions import Self class Invitation(BaseModel): """ Invitation - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the invitation.") email: StrictStr = Field(description="Email that the invitation is sent to") invitee_name: Optional[StrictStr] = Field(description="Name of the person being invited.") @@ -36,15 +34,7 @@ class Invitation(BaseModel): invitor_name: Optional[StrictStr] = Field(description="Name of the person sending the invite.") status: StrictStr = Field(description="Status of the invitation.") created_at: StrictStr = Field(description="Creation timestamp.") - __properties: ClassVar[List[str]] = [ - "id", - "email", - "invitee_name", - "invitor", - "invitor_name", - "status", - "created_at", - ] + __properties: ClassVar[List[str]] = ["id", "email", "invitee_name", "invitor", "invitor_name", "status", "created_at"] model_config = ConfigDict( populate_by_name=True, @@ -52,6 +42,7 @@ class Invitation(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,17 +74,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "email", - "invitee_name", - "invitor", - "invitor_name", - "status", - "created_at", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "email", + "invitee_name", + "invitor", + "invitor_name", + "status", + "created_at", + ]) _dict = self.model_dump( by_alias=True, @@ -102,16 +91,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitor if self.invitor: - _dict["invitor"] = self.invitor.to_dict() + _dict['invitor'] = self.invitor.to_dict() # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict["invitee_name"] = None + _dict['invitee_name'] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict["invitor_name"] = None + _dict['invitor_name'] = None return _dict @@ -124,17 +113,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor": ( - User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None - ), - "invitor_name": obj.get("invitor_name"), - "status": obj.get("status"), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor": User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None, + "invitor_name": obj.get("invitor_name"), + "status": obj.get("status"), + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/saturn_api/models/invitation_create.py b/saturn_api/models/invitation_create.py index 28c567c..639e86f 100644 --- a/saturn_api/models/invitation_create.py +++ b/saturn_api/models/invitation_create.py @@ -1,37 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class InvitationCreate(BaseModel): """ InvitationCreate - """ # noqa: E501 - + """ # noqa: E501 email: StrictStr = Field(description="Email that the invitation is sent to.") invitee_name: Optional[StrictStr] = None - invitor_name: Optional[StrictStr] = Field( - default=None, description="Name of the person sending the invite." - ) + invitor_name: Optional[StrictStr] = Field(default=None, description="Name of the person sending the invite.") __properties: ClassVar[List[str]] = ["email", "invitee_name", "invitor_name"] model_config = ConfigDict( @@ -40,6 +37,7 @@ class InvitationCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +73,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict["invitee_name"] = None + _dict['invitee_name'] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict["invitor_name"] = None + _dict['invitor_name'] = None return _dict @@ -92,11 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor_name": obj.get("invitor_name"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor_name": obj.get("invitor_name") + }) return _obj + + diff --git a/saturn_api/models/invitation_list.py b/saturn_api/models/invitation_list.py index 824a797..7b5e1eb 100644 --- a/saturn_api/models/invitation_list.py +++ b/saturn_api/models/invitation_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.invitation import Invitation - +from typing import Literal, Optional, Set +from typing_extensions import Self class InvitationList(BaseModel): """ InvitationList - """ # noqa: E501 - + """ # noqa: E501 invitations: List[Invitation] = Field(description="List of invitations.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class InvitationList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "invitations", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "invitations", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_invitations in self.invitations: if _item_invitations: _items.append(_item_invitations.to_dict()) - _dict["invitations"] = _items + _dict['invitations'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitations": ( - [Invitation.from_dict(_item) for _item in obj["invitations"]] - if obj.get("invitations") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "invitations": [Invitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/invitation_status.py b/saturn_api/models/invitation_status.py index 8aa73b1..8dc38a2 100644 --- a/saturn_api/models/invitation_status.py +++ b/saturn_api/models/invitation_status.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class InvitationStatus(str, Enum): """ allowed enum values """ - PENDING = "pending" - APPROVED = "approved" - REJECTED = "rejected" + PENDING = 'pending' + APPROVED = 'approved' + REJECTED = 'rejected' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InvitationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/invitation_update.py b/saturn_api/models/invitation_update.py index a81e990..1de167f 100644 --- a/saturn_api/models/invitation_update.py +++ b/saturn_api/models/invitation_update.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.invitation_status import InvitationStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class InvitationUpdate(BaseModel): """ InvitationUpdate - """ # noqa: E501 - + """ # noqa: E501 status: InvitationStatus __properties: ClassVar[List[str]] = ["status"] @@ -38,6 +36,7 @@ class InvitationUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"status": obj.get("status")}) + _obj = cls.model_validate({ + "status": obj.get("status") + }) return _obj + + diff --git a/saturn_api/models/job.py b/saturn_api/models/job.py index 8a00b52..f2b76f8 100644 --- a/saturn_api/models/job.py +++ b/saturn_api/models/job.py @@ -1,123 +1,71 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictInt, - StrictStr, - field_validator, -) -from typing_extensions import Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.cron_schedule import CronSchedule from saturn_api.models.dask_cluster_nested import DaskClusterNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.image_tag import ImageTag from saturn_api.models.owner import Owner - +from typing import Literal, Optional, Set +from typing_extensions import Self class Job(BaseModel): """ Job - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the job.") name: StrictStr = Field(description="Name of the job.") owner: Owner = Field(description="Owner of the job.") command: StrictStr = Field(description="Command that runs on start.") description: StrictStr = Field(description="Description of the job.") - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the job." - ) + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the job.") instance_size: StrictStr = Field(description="Instance size of the job.") image_tag: ImageTag = Field(description="Image tag that is attached to the job.") - extra_packages: Optional[ExtraPackages] = Field( - description="Addtitional packages to install on start." - ) - cron_schedule_options: Optional[CronSchedule] = Field( - default=None, description="Cron schedule configuration for scheduled jobs." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script that runs on start before the primary command." - ) - environment_variables: Dict[str, StrictStr] = Field( - description="Mapping of environment variable keys to values." - ) + extra_packages: Optional[ExtraPackages] = Field(description="Addtitional packages to install on start.") + cron_schedule_options: Optional[CronSchedule] = Field(default=None, description="Cron schedule configuration for scheduled jobs.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") + environment_variables: Dict[str, StrictStr] = Field(description="Mapping of environment variable keys to values.") working_dir: StrictStr = Field(description="Initial working directory.") is_spot: StrictBool = Field(description="Enables running on spot instance sizes.") start_dind: StrictBool = Field(description="Enables docker-in-docker.") scale: StrictInt = Field(description="Number of pod replicas.") + retries: StrictInt = Field(description="Maximum number of retries for a failed job.") k8s_name: StrictStr = Field(description="Unique name for associated kubernetes objects.") - require_restart: StrictBool = Field( - description="True if an update was applied that requires restart to take effect." - ) - resource_type: Literal["job"] + require_restart: StrictBool = Field(description="True if an update was applied that requires restart to take effect.") + resource_type: Literal['job'] size_display: StrictStr = Field(description="Description of the instance size.") created_at: StrictStr = Field(description="Creation timestamp.") updated_at: StrictStr = Field(description="Update timestamp.") last_deploy: StrictStr = Field(description="Last started timestamp.") - dask_cluster: Optional[DaskClusterNested] = Field( - default=None, description="Dask cluster attached to the job." - ) + dask_cluster: Optional[DaskClusterNested] = Field(default=None, description="Dask cluster attached to the job.") status: StrictStr = Field(description="Current status of the job.") running_count: StrictInt = Field(description="Number of running pods.") debug_mode: StrictBool = Field(description="True if job is running in debug mode.") scheduled: StrictBool = Field(description="True if job is currently scheduled.") - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "command", - "description", - "tags", - "instance_size", - "image_tag", - "extra_packages", - "cron_schedule_options", - "start_script", - "environment_variables", - "working_dir", - "is_spot", - "start_dind", - "scale", - "k8s_name", - "require_restart", - "resource_type", - "size_display", - "created_at", - "updated_at", - "last_deploy", - "dask_cluster", - "status", - "running_count", - "debug_mode", - "scheduled", - ] + __properties: ClassVar[List[str]] = ["id", "name", "owner", "command", "description", "tags", "instance_size", "image_tag", "extra_packages", "cron_schedule_options", "start_script", "environment_variables", "working_dir", "is_spot", "start_dind", "scale", "retries", "k8s_name", "require_restart", "resource_type", "size_display", "created_at", "updated_at", "last_deploy", "dask_cluster", "status", "running_count", "debug_mode", "scheduled"] - @field_validator("resource_type") + @field_validator('resource_type') def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["job"]): + if value not in set(['job']): raise ValueError("must be one of enum values ('job')") return value @@ -127,6 +75,7 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -177,38 +126,38 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "command", - "description", - "instance_size", - "image_tag", - "extra_packages", - "cron_schedule_options", - "start_script", - "environment_variables", - "working_dir", - "is_spot", - "start_dind", - "scale", - "k8s_name", - "require_restart", - "resource_type", - "size_display", - "created_at", - "updated_at", - "last_deploy", - "dask_cluster", - "status", - "running_count", - "debug_mode", - "scheduled", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "command", + "description", + "instance_size", + "image_tag", + "extra_packages", + "cron_schedule_options", + "start_script", + "environment_variables", + "working_dir", + "is_spot", + "start_dind", + "scale", + "retries", + "k8s_name", + "require_restart", + "resource_type", + "size_display", + "created_at", + "updated_at", + "last_deploy", + "dask_cluster", + "status", + "running_count", + "debug_mode", + "scheduled", + ]) _dict = self.model_dump( by_alias=True, @@ -217,33 +166,33 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image_tag if self.image_tag: - _dict["image_tag"] = self.image_tag.to_dict() + _dict['image_tag'] = self.image_tag.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of cron_schedule_options if self.cron_schedule_options: - _dict["cron_schedule_options"] = self.cron_schedule_options.to_dict() + _dict['cron_schedule_options'] = self.cron_schedule_options.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict["dask_cluster"] = self.dask_cluster.to_dict() + _dict['dask_cluster'] = self.dask_cluster.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None return _dict @@ -256,52 +205,37 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "command": obj.get("command"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_tag": ( - ImageTag.from_dict(obj["image_tag"]) - if obj.get("image_tag") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "cron_schedule_options": ( - CronSchedule.from_dict(obj["cron_schedule_options"]) - if obj.get("cron_schedule_options") is not None - else None - ), - "start_script": obj.get("start_script"), - "environment_variables": obj.get("environment_variables"), - "working_dir": obj.get("working_dir"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "scale": obj.get("scale"), - "k8s_name": obj.get("k8s_name"), - "require_restart": obj.get("require_restart"), - "resource_type": obj.get("resource_type"), - "size_display": obj.get("size_display"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "last_deploy": obj.get("last_deploy"), - "dask_cluster": ( - DaskClusterNested.from_dict(obj["dask_cluster"]) - if obj.get("dask_cluster") is not None - else None - ), - "status": obj.get("status"), - "running_count": obj.get("running_count"), - "debug_mode": obj.get("debug_mode"), - "scheduled": obj.get("scheduled"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "command": obj.get("command"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_tag": ImageTag.from_dict(obj["image_tag"]) if obj.get("image_tag") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "cron_schedule_options": CronSchedule.from_dict(obj["cron_schedule_options"]) if obj.get("cron_schedule_options") is not None else None, + "start_script": obj.get("start_script"), + "environment_variables": obj.get("environment_variables"), + "working_dir": obj.get("working_dir"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "scale": obj.get("scale"), + "retries": obj.get("retries"), + "k8s_name": obj.get("k8s_name"), + "require_restart": obj.get("require_restart"), + "resource_type": obj.get("resource_type"), + "size_display": obj.get("size_display"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "last_deploy": obj.get("last_deploy"), + "dask_cluster": DaskClusterNested.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, + "status": obj.get("status"), + "running_count": obj.get("running_count"), + "debug_mode": obj.get("debug_mode"), + "scheduled": obj.get("scheduled") + }) return _obj + + diff --git a/saturn_api/models/job_create.py b/saturn_api/models/job_create.py index 5de896c..f077162 100644 --- a/saturn_api/models/job_create.py +++ b/saturn_api/models/job_create.py @@ -1,103 +1,56 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.cron_schedule_create import CronScheduleCreate -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobCreate(BaseModel): """ JobCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the job.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the job.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default="", description="Description of the job." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the job." - ) - instance_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the job." - ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the job.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the job.") + instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the job.") image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field( - default=True, description="Enable image trust validation before attaching." - ) - environment_variables: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Mapping of environment variable keys to values." - ) - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( - default=None, description="List of external repo attachments for the job." - ) - extra_packages: Optional[ExtraPackages] = Field( - default=None, description="Addtitional packages to install on start." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script to run on start before the primary command." - ) - working_dir: Optional[StrictStr] = Field( - default="/home/jovyan/workspace", description="Initial working directory for the job." - ) - is_spot: Optional[StrictBool] = Field( - default=False, description="Enables running on spot instance sizes." - ) + image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") + environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments for the job.") + extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script to run on start before the primary command.") + working_dir: Optional[StrictStr] = Field(default='/home/jovyan/workspace', description="Initial working directory for the job.") + is_spot: Optional[StrictBool] = Field(default=False, description="Enables running on spot instance sizes.") start_dind: Optional[StrictBool] = Field(default=False, description="Enables docker-in-docker.") - command: Annotated[str, Field(min_length=1, strict=True)] = Field( - description="Command that runs on start." - ) - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( - default=1, description="Number of pod replicas." - ) - cron_schedule_options: Optional[CronScheduleCreate] = Field( - default=None, description="Cron schedule configuration for scheduled jobs." - ) - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "tags", - "instance_size", - "image_uri", - "image_tag_id", - "image_enforce_trusted", - "environment_variables", - "external_repo_attachments", - "extra_packages", - "start_script", - "working_dir", - "is_spot", - "start_dind", - "command", - "scale", - "cron_schedule_options", - ] + command: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Command that runs on start.") + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Number of pod replicas.") + retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=0, description="Maximum number of retries for a failed job.") + cron_schedule_options: Optional[CronScheduleCreate] = Field(default=None, description="Cron schedule configuration for scheduled jobs.") + __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "instance_size", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "is_spot", "start_dind", "command", "scale", "retries", "cron_schedule_options"] model_config = ConfigDict( populate_by_name=True, @@ -105,6 +58,7 @@ class JobCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -129,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -138,52 +93,49 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in external_repo_attachments (list) _items = [] if self.external_repo_attachments: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of cron_schedule_options if self.cron_schedule_options: - _dict["cron_schedule_options"] = self.cron_schedule_options.to_dict() + _dict['cron_schedule_options'] = self.cron_schedule_options.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if environment_variables (nullable) is None # and model_fields_set contains the field if self.environment_variables is None and "environment_variables" in self.model_fields_set: - _dict["environment_variables"] = None + _dict['environment_variables'] = None # set to None if external_repo_attachments (nullable) is None # and model_fields_set contains the field - if ( - self.external_repo_attachments is None - and "external_repo_attachments" in self.model_fields_set - ): - _dict["external_repo_attachments"] = None + if self.external_repo_attachments is None and "external_repo_attachments" in self.model_fields_set: + _dict['external_repo_attachments'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if cron_schedule_options (nullable) is None # and model_fields_set contains the field if self.cron_schedule_options is None and "cron_schedule_options" in self.model_fields_set: - _dict["cron_schedule_options"] = None + _dict['cron_schedule_options'] = None return _dict @@ -196,51 +148,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description") if obj.get("description") is not None else "", - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": ( - obj.get("image_enforce_trusted") - if obj.get("image_enforce_trusted") is not None - else True - ), - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": ( - [ - ExternalRepoAttachmentNested.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "working_dir": ( - obj.get("working_dir") - if obj.get("working_dir") is not None - else "/home/jovyan/workspace" - ), - "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, - "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "cron_schedule_options": ( - CronScheduleCreate.from_dict(obj["cron_schedule_options"]) - if obj.get("cron_schedule_options") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description") if obj.get("description") is not None else '', + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir") if obj.get("working_dir") is not None else '/home/jovyan/workspace', + "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, + "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "retries": obj.get("retries") if obj.get("retries") is not None else 0, + "cron_schedule_options": CronScheduleCreate.from_dict(obj["cron_schedule_options"]) if obj.get("cron_schedule_options") is not None else None + }) return _obj + + diff --git a/saturn_api/models/job_list.py b/saturn_api/models/job_list.py index 9dbfc23..2d6645f 100644 --- a/saturn_api/models/job_list.py +++ b/saturn_api/models/job_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.job import Job - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobList(BaseModel): """ JobList - """ # noqa: E501 - + """ # noqa: E501 jobs: List[Job] = Field(description="List of jobs.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class JobList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "jobs", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "jobs", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_jobs in self.jobs: if _item_jobs: _items.append(_item_jobs.to_dict()) - _dict["jobs"] = _items + _dict['jobs'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "jobs": ( - [Job.from_dict(_item) for _item in obj["jobs"]] - if obj.get("jobs") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "jobs": [Job.from_dict(_item) for _item in obj["jobs"]] if obj.get("jobs") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/job_recipe.py b/saturn_api/models/job_recipe.py index 02f5afb..e6026b0 100644 --- a/saturn_api/models/job_recipe.py +++ b/saturn_api/models/job_recipe.py @@ -1,45 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.job_spec import JobSpec from saturn_api.models.resource_state import ResourceState - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobRecipe(BaseModel): """ JobRecipe - """ # noqa: E501 - - schema_version: Optional[StrictStr] = "2025.10.01" - type: Literal["job"] + """ # noqa: E501 + schema_version: Optional[StrictStr] = '2025.10.01' + type: Literal['job'] spec: JobSpec state: Optional[ResourceState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator("type") + @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["job"]): + if value not in set(['job']): raise ValueError("must be one of enum values ('job')") return value @@ -49,6 +47,7 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,11 +73,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "state", - ] - ) + excluded_fields: Set[str] = set([ + "state", + ]) _dict = self.model_dump( by_alias=True, @@ -87,10 +84,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict["spec"] = self.spec.to_dict() + _dict['spec'] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() return _dict @classmethod @@ -102,18 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schema_version": ( - obj.get("schema_version") - if obj.get("schema_version") is not None - else "2025.10.01" - ), - "type": obj.get("type"), - "spec": JobSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, - "state": ( - ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', + "type": obj.get("type"), + "spec": JobSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "state": ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None + }) return _obj + + diff --git a/saturn_api/models/job_restart.py b/saturn_api/models/job_restart.py index 2701a43..4e4eaae 100644 --- a/saturn_api/models/job_restart.py +++ b/saturn_api/models/job_restart.py @@ -1,36 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class JobRestart(BaseModel): """ JobRestart - """ # noqa: E501 - - debug_mode: Optional[StrictBool] = Field( - default=None, - description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.", - ) + """ # noqa: E501 + debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.") __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -39,6 +35,7 @@ class JobRestart(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) + _obj = cls.model_validate({ + "debug_mode": obj.get("debug_mode") + }) return _obj + + diff --git a/saturn_api/models/job_runtime_summary.py b/saturn_api/models/job_runtime_summary.py index f25112a..693afa6 100644 --- a/saturn_api/models/job_runtime_summary.py +++ b/saturn_api/models/job_runtime_summary.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.condition import Condition from saturn_api.models.job_status import JobStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobRuntimeSummary(BaseModel): """ JobRuntimeSummary - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr namespace: StrictStr uid: StrictStr @@ -46,23 +44,7 @@ class JobRuntimeSummary(BaseModel): running_count: StrictInt active_count: StrictInt completed_at: Optional[datetime] - __properties: ClassVar[List[str]] = [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "status", - "scale", - "running_count", - "active_count", - "completed_at", - ] + __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "scale", "running_count", "active_count", "completed_at"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +52,7 @@ class JobRuntimeSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -108,24 +91,22 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "scale", - "running_count", - "active_count", - "completed_at", - ] - ) + excluded_fields: Set[str] = set([ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "scale", + "running_count", + "active_count", + "completed_at", + ]) _dict = self.model_dump( by_alias=True, @@ -138,31 +119,31 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict["conditions"] = _items + _dict['conditions'] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict["controller_uid"] = None + _dict['controller_uid'] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict["controller_kind"] = None + _dict['controller_kind'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict["deleted_at"] = None + _dict['deleted_at'] = None # set to None if completed_at (nullable) is None # and model_fields_set contains the field if self.completed_at is None and "completed_at" in self.model_fields_set: - _dict["completed_at"] = None + _dict['completed_at'] = None return _dict @@ -175,27 +156,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": ( - [Condition.from_dict(_item) for _item in obj["conditions"]] - if obj.get("conditions") is not None - else None - ), - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "scale": obj.get("scale"), - "running_count": obj.get("running_count"), - "active_count": obj.get("active_count"), - "completed_at": obj.get("completed_at"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "scale": obj.get("scale"), + "running_count": obj.get("running_count"), + "active_count": obj.get("active_count"), + "completed_at": obj.get("completed_at") + }) return _obj + + diff --git a/saturn_api/models/job_runtime_summary_list.py b/saturn_api/models/job_runtime_summary_list.py index d33d139..dbe6d39 100644 --- a/saturn_api/models/job_runtime_summary_list.py +++ b/saturn_api/models/job_runtime_summary_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.job_runtime_summary import JobRuntimeSummary - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobRuntimeSummaryList(BaseModel): """ JobRuntimeSummaryList - """ # noqa: E501 - + """ # noqa: E501 job_summaries: List[JobRuntimeSummary] = Field(description="List of job runtime summaries.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class JobRuntimeSummaryList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "job_summaries", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "job_summaries", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_job_summaries in self.job_summaries: if _item_job_summaries: _items.append(_item_job_summaries.to_dict()) - _dict["job_summaries"] = _items + _dict['job_summaries'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "job_summaries": ( - [JobRuntimeSummary.from_dict(_item) for _item in obj["job_summaries"]] - if obj.get("job_summaries") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "job_summaries": [JobRuntimeSummary.from_dict(_item) for _item in obj["job_summaries"]] if obj.get("job_summaries") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/job_server_info.py b/saturn_api/models/job_server_info.py index c1281dd..fe00bf7 100644 --- a/saturn_api/models/job_server_info.py +++ b/saturn_api/models/job_server_info.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.default_images import DefaultImages from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.server_options_size import ServerOptionsSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobServerInfo(BaseModel): """ JobServerInfo - """ # noqa: E501 - + """ # noqa: E501 server_options: ServerOptionsSize = Field(description="Configuration options for jobs.") default_images: DefaultImages = Field(description="Default images for jobs.") default_sizes: DefaultSizes = Field(description="Default instance sizes for jobs.") @@ -42,6 +40,7 @@ class JobServerInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,13 +75,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict["server_options"] = self.server_options.to_dict() + _dict['server_options'] = self.server_options.to_dict() # override the default output from pydantic by calling `to_dict()` of default_images if self.default_images: - _dict["default_images"] = self.default_images.to_dict() + _dict['default_images'] = self.default_images.to_dict() # override the default output from pydantic by calling `to_dict()` of default_sizes if self.default_sizes: - _dict["default_sizes"] = self.default_sizes.to_dict() + _dict['default_sizes'] = self.default_sizes.to_dict() return _dict @classmethod @@ -93,23 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "server_options": ( - ServerOptionsSize.from_dict(obj["server_options"]) - if obj.get("server_options") is not None - else None - ), - "default_images": ( - DefaultImages.from_dict(obj["default_images"]) - if obj.get("default_images") is not None - else None - ), - "default_sizes": ( - DefaultSizes.from_dict(obj["default_sizes"]) - if obj.get("default_sizes") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "server_options": ServerOptionsSize.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None, + "default_images": DefaultImages.from_dict(obj["default_images"]) if obj.get("default_images") is not None else None, + "default_sizes": DefaultSizes.from_dict(obj["default_sizes"]) if obj.get("default_sizes") is not None else None + }) return _obj + + diff --git a/saturn_api/models/job_spec.py b/saturn_api/models/job_spec.py index 48cf46b..b5ec181 100644 --- a/saturn_api/models/job_spec.py +++ b/saturn_api/models/job_spec.py @@ -1,51 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictStr, - field_validator, -) -from typing_extensions import Annotated, Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment -from saturn_api.models.external_repo_attachment_recipe import ( - ExternalRepoAttachmentRecipe, -) +from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe from saturn_api.models.image_tag_reference import ImageTagReference from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe -from saturn_api.models.shared_folder_attachment_recipe import ( - SharedFolderAttachmentRecipe, -) - +from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe +from typing import Literal, Optional, Set +from typing_extensions import Self class JobSpec(BaseModel): """ JobSpec - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr owner: Optional[OwnerReference] = None description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None @@ -62,56 +50,32 @@ class JobSpec(BaseModel): secrets: Optional[List[SecretAttachmentRecipe]] = None shared_folders: Optional[List[SharedFolderAttachmentRecipe]] = None start_dind: Optional[StrictBool] = None - status: Literal["stopped", "running"] | None = None + status: Literal['stopped', 'running'] | None = None command: Annotated[str, Field(min_length=1, strict=True)] scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1 use_spot_instance: Optional[StrictBool] = False schedule: Optional[StrictStr] = None - concurrency_policy: Literal["Allow", "Forbid", "Replace"] | None = None + concurrency_policy: Literal['Allow', 'Forbid', 'Replace'] | None = None retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = None - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "tags", - "image", - "instance_type", - "environment_variables", - "working_directory", - "extra_packages", - "start_script", - "token_scope", - "dask_cluster", - "git_repositories", - "secrets", - "shared_folders", - "start_dind", - "status", - "command", - "scale", - "use_spot_instance", - "schedule", - "concurrency_policy", - "retries", - ] + __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "image", "instance_type", "environment_variables", "working_directory", "extra_packages", "start_script", "token_scope", "dask_cluster", "git_repositories", "secrets", "shared_folders", "start_dind", "status", "command", "scale", "use_spot_instance", "schedule", "concurrency_policy", "retries"] - @field_validator("status") + @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["stopped", "running"]): + if value not in set(['stopped', 'running']): raise ValueError("must be one of enum values ('stopped', 'running')") return value - @field_validator("concurrency_policy") + @field_validator('concurrency_policy') def concurrency_policy_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["Allow", "Forbid", "Replace"]): + if value not in set(['Allow', 'Forbid', 'Replace']): raise ValueError("must be one of enum values ('Allow', 'Forbid', 'Replace')") return value @@ -121,6 +85,7 @@ def concurrency_policy_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -145,7 +110,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -154,61 +120,61 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict["image"] = self.image.to_dict() + _dict['image'] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict["dask_cluster"] = self.dask_cluster.to_dict() + _dict['dask_cluster'] = self.dask_cluster.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in git_repositories (list) _items = [] if self.git_repositories: for _item_git_repositories in self.git_repositories: if _item_git_repositories: _items.append(_item_git_repositories.to_dict()) - _dict["git_repositories"] = _items + _dict['git_repositories'] = _items # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) _items = [] if self.secrets: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict["secrets"] = _items + _dict['secrets'] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_folders (list) _items = [] if self.shared_folders: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict["shared_folders"] = _items + _dict['shared_folders'] = _items # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if token_scope (nullable) is None # and model_fields_set contains the field if self.token_scope is None and "token_scope" in self.model_fields_set: - _dict["token_scope"] = None + _dict['token_scope'] = None # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict["status"] = None + _dict['status'] = None # set to None if schedule (nullable) is None # and model_fields_set contains the field if self.schedule is None and "schedule" in self.model_fields_set: - _dict["schedule"] = None + _dict['schedule'] = None return _dict @@ -221,67 +187,31 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image": ( - ImageTagReference.from_dict(obj["image"]) - if obj.get("image") is not None - else None - ), - "instance_type": obj.get("instance_type"), - "environment_variables": obj.get("environment_variables"), - "working_directory": obj.get("working_directory"), - "extra_packages": ( - ExtraPackagesRecipe.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "token_scope": obj.get("token_scope"), - "dask_cluster": ( - DaskClusterAttachment.from_dict(obj["dask_cluster"]) - if obj.get("dask_cluster") is not None - else None - ), - "git_repositories": ( - [ - ExternalRepoAttachmentRecipe.from_dict(_item) - for _item in obj["git_repositories"] - ] - if obj.get("git_repositories") is not None - else None - ), - "secrets": ( - [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] - if obj.get("secrets") is not None - else None - ), - "shared_folders": ( - [ - SharedFolderAttachmentRecipe.from_dict(_item) - for _item in obj["shared_folders"] - ] - if obj.get("shared_folders") is not None - else None - ), - "start_dind": obj.get("start_dind"), - "status": obj.get("status"), - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "use_spot_instance": ( - obj.get("use_spot_instance") - if obj.get("use_spot_instance") is not None - else False - ), - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy"), - "retries": obj.get("retries"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "tags": obj.get("tags"), + "image": ImageTagReference.from_dict(obj["image"]) if obj.get("image") is not None else None, + "instance_type": obj.get("instance_type"), + "environment_variables": obj.get("environment_variables"), + "working_directory": obj.get("working_directory"), + "extra_packages": ExtraPackagesRecipe.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "token_scope": obj.get("token_scope"), + "dask_cluster": DaskClusterAttachment.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, + "git_repositories": [ExternalRepoAttachmentRecipe.from_dict(_item) for _item in obj["git_repositories"]] if obj.get("git_repositories") is not None else None, + "secrets": [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, + "shared_folders": [SharedFolderAttachmentRecipe.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, + "start_dind": obj.get("start_dind"), + "status": obj.get("status"), + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "use_spot_instance": obj.get("use_spot_instance") if obj.get("use_spot_instance") is not None else False, + "schedule": obj.get("schedule"), + "concurrency_policy": obj.get("concurrency_policy"), + "retries": obj.get("retries") + }) return _obj + + diff --git a/saturn_api/models/job_start.py b/saturn_api/models/job_start.py index fe59d1d..cab99cc 100644 --- a/saturn_api/models/job_start.py +++ b/saturn_api/models/job_start.py @@ -1,36 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class JobStart(BaseModel): """ JobStart - """ # noqa: E501 - - debug_mode: Optional[StrictBool] = Field( - default=None, - description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.", - ) + """ # noqa: E501 + debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.") __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -39,6 +35,7 @@ class JobStart(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) + _obj = cls.model_validate({ + "debug_mode": obj.get("debug_mode") + }) return _obj + + diff --git a/saturn_api/models/job_status.py b/saturn_api/models/job_status.py index 84283db..194387d 100644 --- a/saturn_api/models/job_status.py +++ b/saturn_api/models/job_status.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,14 +26,16 @@ class JobStatus(str, Enum): """ allowed enum values """ - PENDING = "pending" - RUNNING = "running" - STOPPING = "stopping" - STOPPED = "stopped" - COMPLETED = "completed" - ERROR = "error" + PENDING = 'pending' + RUNNING = 'running' + STOPPING = 'stopping' + STOPPED = 'stopped' + COMPLETED = 'completed' + ERROR = 'error' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of JobStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/job_update.py b/saturn_api/models/job_update.py index 06cdf12..3c464cd 100644 --- a/saturn_api/models/job_update.py +++ b/saturn_api/models/job_update.py @@ -1,98 +1,54 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.cron_schedule_update import CronScheduleUpdate -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested from saturn_api.models.extra_packages import ExtraPackages - +from typing import Literal, Optional, Set +from typing_extensions import Self class JobUpdate(BaseModel): """ JobUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the job.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default=None, description="Description of the job." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the job." - ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the job.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the job.") image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field( - default=True, description="Enable image trust validation before attaching." - ) - environment_variables: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Mapping of environment variable keys to values." - ) - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( - default=None, description="List of external repo attachments." - ) - extra_packages: Optional[ExtraPackages] = Field( - default=None, description="Addtitional packages to install on start." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script that runs on start before the primary command." - ) + image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") + environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments.") + extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") working_dir: Optional[StrictStr] = Field(default=None, description="Initial working directory.") - instance_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the job." - ) - is_spot: Optional[StrictBool] = Field( - default=None, description="Enables running on spot instance sizes." - ) + instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the job.") + is_spot: Optional[StrictBool] = Field(default=None, description="Enables running on spot instance sizes.") start_dind: Optional[StrictBool] = Field(default=None, description="Enables docker-in-docker.") - command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( - default=None, description="Command that runs on start." - ) - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( - default=None, description="Number of pod replicas." - ) - cron_schedule_options: Optional[CronScheduleUpdate] = Field( - default=None, description="Cron schedule configuration for scheduled jobs." - ) - __properties: ClassVar[List[str]] = [ - "name", - "description", - "tags", - "image_uri", - "image_tag_id", - "image_enforce_trusted", - "environment_variables", - "external_repo_attachments", - "extra_packages", - "start_script", - "working_dir", - "instance_size", - "is_spot", - "start_dind", - "command", - "scale", - "cron_schedule_options", - ] + command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Command that runs on start.") + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Number of pod replicas.") + retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of retries for a failed job.") + cron_schedule_options: Optional[CronScheduleUpdate] = Field(default=None, description="Cron schedule configuration for scheduled jobs.") + __properties: ClassVar[List[str]] = ["name", "description", "tags", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "instance_size", "is_spot", "start_dind", "command", "scale", "retries", "cron_schedule_options"] model_config = ConfigDict( populate_by_name=True, @@ -100,6 +56,7 @@ class JobUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -124,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -137,32 +95,32 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of cron_schedule_options if self.cron_schedule_options: - _dict["cron_schedule_options"] = self.cron_schedule_options.to_dict() + _dict['cron_schedule_options'] = self.cron_schedule_options.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if cron_schedule_options (nullable) is None # and model_fields_set contains the field if self.cron_schedule_options is None and "cron_schedule_options" in self.model_fields_set: - _dict["cron_schedule_options"] = None + _dict['cron_schedule_options'] = None return _dict @@ -175,44 +133,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": ( - obj.get("image_enforce_trusted") - if obj.get("image_enforce_trusted") is not None - else True - ), - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": ( - [ - ExternalRepoAttachmentNested.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir"), - "instance_size": obj.get("instance_size"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "command": obj.get("command"), - "scale": obj.get("scale"), - "cron_schedule_options": ( - CronScheduleUpdate.from_dict(obj["cron_schedule_options"]) - if obj.get("cron_schedule_options") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir"), + "instance_size": obj.get("instance_size"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "command": obj.get("command"), + "scale": obj.get("scale"), + "retries": obj.get("retries"), + "cron_schedule_options": CronScheduleUpdate.from_dict(obj["cron_schedule_options"]) if obj.get("cron_schedule_options") is not None else None + }) return _obj + + diff --git a/saturn_api/models/login.py b/saturn_api/models/login.py index 697aef3..29c0af5 100644 --- a/saturn_api/models/login.py +++ b/saturn_api/models/login.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class Login(BaseModel): """ Login - """ # noqa: E501 - + """ # noqa: E501 username: StrictStr = Field(description="The user's login username.") password: StrictStr = Field(description="The user's password.") __properties: ClassVar[List[str]] = ["username", "password"] @@ -37,6 +36,7 @@ class Login(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,7 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/saturn_api/models/metric_series.py b/saturn_api/models/metric_series.py index 2200fea..3c7c5bf 100644 --- a/saturn_api/models/metric_series.py +++ b/saturn_api/models/metric_series.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.data_point import DataPoint from saturn_api.models.stats import Stats - +from typing import Literal, Optional, Set +from typing_extensions import Self class MetricSeries(BaseModel): """ MetricSeries - """ # noqa: E501 - + """ # noqa: E501 pod_name: StrictStr = Field(description="Name of the pod.") labels: Dict[str, StrictStr] = Field(description="Labels associated with the pod.") stats: Stats = Field(description="Stats computed over the data range.") @@ -42,6 +40,7 @@ class MetricSeries(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,14 +69,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "pod_name", - "labels", - "stats", - "data", - ] - ) + excluded_fields: Set[str] = set([ + "pod_name", + "labels", + "stats", + "data", + ]) _dict = self.model_dump( by_alias=True, @@ -86,14 +83,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of stats if self.stats: - _dict["stats"] = self.stats.to_dict() + _dict['stats'] = self.stats.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in data (list) _items = [] if self.data: for _item_data in self.data: if _item_data: _items.append(_item_data.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -105,16 +102,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pod_name": obj.get("pod_name"), - "labels": obj.get("labels"), - "stats": Stats.from_dict(obj["stats"]) if obj.get("stats") is not None else None, - "data": ( - [DataPoint.from_dict(_item) for _item in obj["data"]] - if obj.get("data") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "pod_name": obj.get("pod_name"), + "labels": obj.get("labels"), + "stats": Stats.from_dict(obj["stats"]) if obj.get("stats") is not None else None, + "data": [DataPoint.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) return _obj + + diff --git a/saturn_api/models/metrics.py b/saturn_api/models/metrics.py index a7796cd..eb32d80 100644 --- a/saturn_api/models/metrics.py +++ b/saturn_api/models/metrics.py @@ -1,60 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.metric_series import MetricSeries - +from typing import Literal, Optional, Set +from typing_extensions import Self class Metrics(BaseModel): """ Metrics - """ # noqa: E501 - - cpu: Optional[List[MetricSeries]] = Field( - default=None, description="CPU usage metric. Values expressed in millicores." - ) - memory: Optional[List[MetricSeries]] = Field( - default=None, description="Memory usage metric. Values expressed in bytes." - ) - network_in: Optional[List[MetricSeries]] = Field( - default=None, description="Network inbound usage metric. Values expressed in bytes." - ) - network_out: Optional[List[MetricSeries]] = Field( - default=None, description="Network outbound usage metric. Values expressed in bytes." - ) - gpu: Optional[List[MetricSeries]] = Field( - default=None, description="GPU usage metric. Values expressed in millicores." - ) - gpu_memory: Optional[List[MetricSeries]] = Field( - default=None, description="GPU memory usage metric. Values expressed in bytes." - ) - __properties: ClassVar[List[str]] = [ - "cpu", - "memory", - "network_in", - "network_out", - "gpu", - "gpu_memory", - ] + """ # noqa: E501 + cpu: Optional[List[MetricSeries]] = Field(default=None, description="CPU usage metric. Values expressed in millicores.") + memory: Optional[List[MetricSeries]] = Field(default=None, description="Memory usage metric. Values expressed in bytes.") + network_in: Optional[List[MetricSeries]] = Field(default=None, description="Network inbound usage metric. Values expressed in bytes.") + network_out: Optional[List[MetricSeries]] = Field(default=None, description="Network outbound usage metric. Values expressed in bytes.") + gpu: Optional[List[MetricSeries]] = Field(default=None, description="GPU usage metric. Values expressed in millicores.") + gpu_memory: Optional[List[MetricSeries]] = Field(default=None, description="GPU memory usage metric. Values expressed in bytes.") + __properties: ClassVar[List[str]] = ["cpu", "memory", "network_in", "network_out", "gpu", "gpu_memory"] model_config = ConfigDict( populate_by_name=True, @@ -62,6 +41,7 @@ class Metrics(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,16 +72,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "cpu", - "memory", - "network_in", - "network_out", - "gpu", - "gpu_memory", - ] - ) + excluded_fields: Set[str] = set([ + "cpu", + "memory", + "network_in", + "network_out", + "gpu", + "gpu_memory", + ]) _dict = self.model_dump( by_alias=True, @@ -114,71 +92,71 @@ def to_dict(self) -> Dict[str, Any]: for _item_cpu in self.cpu: if _item_cpu: _items.append(_item_cpu.to_dict()) - _dict["cpu"] = _items + _dict['cpu'] = _items # override the default output from pydantic by calling `to_dict()` of each item in memory (list) _items = [] if self.memory: for _item_memory in self.memory: if _item_memory: _items.append(_item_memory.to_dict()) - _dict["memory"] = _items + _dict['memory'] = _items # override the default output from pydantic by calling `to_dict()` of each item in network_in (list) _items = [] if self.network_in: for _item_network_in in self.network_in: if _item_network_in: _items.append(_item_network_in.to_dict()) - _dict["network_in"] = _items + _dict['network_in'] = _items # override the default output from pydantic by calling `to_dict()` of each item in network_out (list) _items = [] if self.network_out: for _item_network_out in self.network_out: if _item_network_out: _items.append(_item_network_out.to_dict()) - _dict["network_out"] = _items + _dict['network_out'] = _items # override the default output from pydantic by calling `to_dict()` of each item in gpu (list) _items = [] if self.gpu: for _item_gpu in self.gpu: if _item_gpu: _items.append(_item_gpu.to_dict()) - _dict["gpu"] = _items + _dict['gpu'] = _items # override the default output from pydantic by calling `to_dict()` of each item in gpu_memory (list) _items = [] if self.gpu_memory: for _item_gpu_memory in self.gpu_memory: if _item_gpu_memory: _items.append(_item_gpu_memory.to_dict()) - _dict["gpu_memory"] = _items + _dict['gpu_memory'] = _items # set to None if cpu (nullable) is None # and model_fields_set contains the field if self.cpu is None and "cpu" in self.model_fields_set: - _dict["cpu"] = None + _dict['cpu'] = None # set to None if memory (nullable) is None # and model_fields_set contains the field if self.memory is None and "memory" in self.model_fields_set: - _dict["memory"] = None + _dict['memory'] = None # set to None if network_in (nullable) is None # and model_fields_set contains the field if self.network_in is None and "network_in" in self.model_fields_set: - _dict["network_in"] = None + _dict['network_in'] = None # set to None if network_out (nullable) is None # and model_fields_set contains the field if self.network_out is None and "network_out" in self.model_fields_set: - _dict["network_out"] = None + _dict['network_out'] = None # set to None if gpu (nullable) is None # and model_fields_set contains the field if self.gpu is None and "gpu" in self.model_fields_set: - _dict["gpu"] = None + _dict['gpu'] = None # set to None if gpu_memory (nullable) is None # and model_fields_set contains the field if self.gpu_memory is None and "gpu_memory" in self.model_fields_set: - _dict["gpu_memory"] = None + _dict['gpu_memory'] = None return _dict @@ -191,38 +169,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "cpu": ( - [MetricSeries.from_dict(_item) for _item in obj["cpu"]] - if obj.get("cpu") is not None - else None - ), - "memory": ( - [MetricSeries.from_dict(_item) for _item in obj["memory"]] - if obj.get("memory") is not None - else None - ), - "network_in": ( - [MetricSeries.from_dict(_item) for _item in obj["network_in"]] - if obj.get("network_in") is not None - else None - ), - "network_out": ( - [MetricSeries.from_dict(_item) for _item in obj["network_out"]] - if obj.get("network_out") is not None - else None - ), - "gpu": ( - [MetricSeries.from_dict(_item) for _item in obj["gpu"]] - if obj.get("gpu") is not None - else None - ), - "gpu_memory": ( - [MetricSeries.from_dict(_item) for _item in obj["gpu_memory"]] - if obj.get("gpu_memory") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "cpu": [MetricSeries.from_dict(_item) for _item in obj["cpu"]] if obj.get("cpu") is not None else None, + "memory": [MetricSeries.from_dict(_item) for _item in obj["memory"]] if obj.get("memory") is not None else None, + "network_in": [MetricSeries.from_dict(_item) for _item in obj["network_in"]] if obj.get("network_in") is not None else None, + "network_out": [MetricSeries.from_dict(_item) for _item in obj["network_out"]] if obj.get("network_out") is not None else None, + "gpu": [MetricSeries.from_dict(_item) for _item in obj["gpu"]] if obj.get("gpu") is not None else None, + "gpu_memory": [MetricSeries.from_dict(_item) for _item in obj["gpu_memory"]] if obj.get("gpu_memory") is not None else None + }) return _obj + + diff --git a/saturn_api/models/notification.py b/saturn_api/models/notification.py index 5f57941..bd81303 100644 --- a/saturn_api/models/notification.py +++ b/saturn_api/models/notification.py @@ -1,33 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class Notification(BaseModel): """ Notification - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the notification.") user_id: StrictStr = Field(description="User ID that is notified.") created_at: datetime = Field(description="Creation timestamp.") @@ -35,15 +34,7 @@ class Notification(BaseModel): message: StrictStr = Field(description="Message content of the notification.") data: Dict[str, Any] = Field(description="Additional data associated with the notification.") acknowledged: StrictBool = Field(description="Acknowledged by user.") - __properties: ClassVar[List[str]] = [ - "id", - "user_id", - "created_at", - "topic", - "message", - "data", - "acknowledged", - ] + __properties: ClassVar[List[str]] = ["id", "user_id", "created_at", "topic", "message", "data", "acknowledged"] model_config = ConfigDict( populate_by_name=True, @@ -51,6 +42,7 @@ class Notification(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,17 +74,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "user_id", - "created_at", - "topic", - "message", - "data", - "acknowledged", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "user_id", + "created_at", + "topic", + "message", + "data", + "acknowledged", + ]) _dict = self.model_dump( by_alias=True, @@ -110,15 +100,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "created_at": obj.get("created_at"), - "topic": obj.get("topic"), - "message": obj.get("message"), - "data": obj.get("data"), - "acknowledged": obj.get("acknowledged"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "created_at": obj.get("created_at"), + "topic": obj.get("topic"), + "message": obj.get("message"), + "data": obj.get("data"), + "acknowledged": obj.get("acknowledged") + }) return _obj + + diff --git a/saturn_api/models/notification_acknowledged.py b/saturn_api/models/notification_acknowledged.py index 2ddaaba..61cf777 100644 --- a/saturn_api/models/notification_acknowledged.py +++ b/saturn_api/models/notification_acknowledged.py @@ -1,38 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class NotificationAcknowledged(BaseModel): """ NotificationAcknowledged - """ # noqa: E501 - - notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field( - description="List of notification IDs to acknowledge." - ) - acknowledged: Optional[StrictBool] = Field( - default=True, description="Mark notifications as acknowledged or unacknowledged." - ) + """ # noqa: E501 + notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="List of notification IDs to acknowledge.") + acknowledged: Optional[StrictBool] = Field(default=True, description="Mark notifications as acknowledged or unacknowledged.") __properties: ClassVar[List[str]] = ["notification_ids", "acknowledged"] model_config = ConfigDict( @@ -41,6 +37,7 @@ class NotificationAcknowledged(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "notification_ids": obj.get("notification_ids"), - "acknowledged": ( - obj.get("acknowledged") if obj.get("acknowledged") is not None else True - ), - } - ) + _obj = cls.model_validate({ + "notification_ids": obj.get("notification_ids"), + "acknowledged": obj.get("acknowledged") if obj.get("acknowledged") is not None else True + }) return _obj + + diff --git a/saturn_api/models/notification_delete.py b/saturn_api/models/notification_delete.py index 6484ea2..6eb54e4 100644 --- a/saturn_api/models/notification_delete.py +++ b/saturn_api/models/notification_delete.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class NotificationDelete(BaseModel): """ NotificationDelete - """ # noqa: E501 - - notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field( - description="List of notification IDs to delete." - ) + """ # noqa: E501 + notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="List of notification IDs to delete.") __properties: ClassVar[List[str]] = ["notification_ids"] model_config = ConfigDict( @@ -38,6 +36,7 @@ class NotificationDelete(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"notification_ids": obj.get("notification_ids")}) + _obj = cls.model_validate({ + "notification_ids": obj.get("notification_ids") + }) return _obj + + diff --git a/saturn_api/models/notification_list.py b/saturn_api/models/notification_list.py index e5acaac..005f5eb 100644 --- a/saturn_api/models/notification_list.py +++ b/saturn_api/models/notification_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.notification import Notification - +from typing import Literal, Optional, Set +from typing_extensions import Self class NotificationList(BaseModel): """ NotificationList - """ # noqa: E501 - + """ # noqa: E501 notifications: List[Notification] = Field(description="List of notifications.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class NotificationList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "notifications", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "notifications", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_notifications in self.notifications: if _item_notifications: _items.append(_item_notifications.to_dict()) - _dict["notifications"] = _items + _dict['notifications'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "notifications": ( - [Notification.from_dict(_item) for _item in obj["notifications"]] - if obj.get("notifications") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "notifications": [Notification.from_dict(_item) for _item in obj["notifications"]] if obj.get("notifications") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/notification_subscribe.py b/saturn_api/models/notification_subscribe.py index 5d88227..2e7945b 100644 --- a/saturn_api/models/notification_subscribe.py +++ b/saturn_api/models/notification_subscribe.py @@ -1,37 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class NotificationSubscribe(BaseModel): """ NotificationSubscribe - """ # noqa: E501 - + """ # noqa: E501 topic: StrictStr = Field(description="Topic of the subscription.") user_id: Optional[StrictStr] = Field(default=None, description="User ID to be subscribed.") - options: Optional[Dict[str, Any]] = Field( - default=None, description="Options data for the topic." - ) + options: Optional[Dict[str, Any]] = Field(default=None, description="Options data for the topic.") __properties: ClassVar[List[str]] = ["topic", "user_id", "options"] model_config = ConfigDict( @@ -40,6 +37,7 @@ class NotificationSubscribe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +81,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "topic": obj.get("topic"), - "user_id": obj.get("user_id"), - "options": obj.get("options"), - } - ) + _obj = cls.model_validate({ + "topic": obj.get("topic"), + "user_id": obj.get("user_id"), + "options": obj.get("options") + }) return _obj + + diff --git a/saturn_api/models/notification_subscription.py b/saturn_api/models/notification_subscription.py index 9050607..757b09a 100644 --- a/saturn_api/models/notification_subscription.py +++ b/saturn_api/models/notification_subscription.py @@ -1,38 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class NotificationSubscription(BaseModel): """ NotificationSubscription - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the notification subscription.") user_id: StrictStr = Field(description="User ID to be notified.") topic: StrictStr = Field(description="Topic of the subscription.") - options: Optional[Dict[str, Any]] = Field( - default=None, description="Options data for the topic." - ) + options: Optional[Dict[str, Any]] = Field(default=None, description="Options data for the topic.") __properties: ClassVar[List[str]] = ["id", "user_id", "topic", "options"] model_config = ConfigDict( @@ -41,6 +38,7 @@ class NotificationSubscription(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,14 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "user_id", - "topic", - "options", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "user_id", + "topic", + "options", + ]) _dict = self.model_dump( by_alias=True, @@ -94,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "topic": obj.get("topic"), - "options": obj.get("options"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "topic": obj.get("topic"), + "options": obj.get("options") + }) return _obj + + diff --git a/saturn_api/models/notification_subscription_list.py b/saturn_api/models/notification_subscription_list.py index 8849662..e00ff75 100644 --- a/saturn_api/models/notification_subscription_list.py +++ b/saturn_api/models/notification_subscription_list.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.notification_subscription import NotificationSubscription - +from typing import Literal, Optional, Set +from typing_extensions import Self class NotificationSubscriptionList(BaseModel): """ NotificationSubscriptionList - """ # noqa: E501 - - subscriptions: List[NotificationSubscription] = Field( - description="List of notification subscriptions." - ) + """ # noqa: E501 + subscriptions: List[NotificationSubscription] = Field(description="List of notification subscriptions.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["subscriptions", "prev_key", "next_key"] @@ -42,6 +38,7 @@ class NotificationSubscriptionList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,11 +64,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "subscriptions", - ] - ) + excluded_fields: Set[str] = set([ + "subscriptions", + ]) _dict = self.model_dump( by_alias=True, @@ -84,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_subscriptions in self.subscriptions: if _item_subscriptions: _items.append(_item_subscriptions.to_dict()) - _dict["subscriptions"] = _items + _dict['subscriptions'] = _items return _dict @classmethod @@ -96,15 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subscriptions": ( - [NotificationSubscription.from_dict(_item) for _item in obj["subscriptions"]] - if obj.get("subscriptions") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "subscriptions": [NotificationSubscription.from_dict(_item) for _item in obj["subscriptions"]] if obj.get("subscriptions") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/notification_unsubscribe.py b/saturn_api/models/notification_unsubscribe.py index e94b2e0..c4f1382 100644 --- a/saturn_api/models/notification_unsubscribe.py +++ b/saturn_api/models/notification_unsubscribe.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class NotificationUnsubscribe(BaseModel): """ NotificationUnsubscribe - """ # noqa: E501 - + """ # noqa: E501 topic: StrictStr = Field(description="Topic of the subscription.") user_id: Optional[StrictStr] = Field(default=None, description="User ID to be unsubscribed.") __properties: ClassVar[List[str]] = ["topic", "user_id"] @@ -37,6 +36,7 @@ class NotificationUnsubscribe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,5 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"topic": obj.get("topic"), "user_id": obj.get("user_id")}) + _obj = cls.model_validate({ + "topic": obj.get("topic"), + "user_id": obj.get("user_id") + }) return _obj + + diff --git a/saturn_api/models/object_storage_bulk_delete_results.py b/saturn_api/models/object_storage_bulk_delete_results.py index 536102f..0a0becd 100644 --- a/saturn_api/models/object_storage_bulk_delete_results.py +++ b/saturn_api/models/object_storage_bulk_delete_results.py @@ -1,35 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageBulkDeleteResults(BaseModel): """ ObjectStorageBulkDeleteResults - """ # noqa: E501 - - failed_file_paths: List[StrictStr] = Field( - description="List of file paths that failed to delete." - ) + """ # noqa: E501 + failed_file_paths: List[StrictStr] = Field(description="List of file paths that failed to delete.") __properties: ClassVar[List[str]] = ["failed_file_paths"] model_config = ConfigDict( @@ -38,6 +35,7 @@ class ObjectStorageBulkDeleteResults(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,11 +61,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "failed_file_paths", - ] - ) + excluded_fields: Set[str] = set([ + "failed_file_paths", + ]) _dict = self.model_dump( by_alias=True, @@ -85,5 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"failed_file_paths": obj.get("failed_file_paths")}) + _obj = cls.model_validate({ + "failed_file_paths": obj.get("failed_file_paths") + }) return _obj + + diff --git a/saturn_api/models/object_storage_bulk_download.py b/saturn_api/models/object_storage_bulk_download.py index 2c7a23e..582de79 100644 --- a/saturn_api/models/object_storage_bulk_download.py +++ b/saturn_api/models/object_storage_bulk_download.py @@ -1,36 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload +from typing import Literal, Optional, Set from typing_extensions import Self -from saturn_api.models.object_storage_presigned_download import ( - ObjectStoragePresignedDownload, -) - - class ObjectStorageBulkDownload(BaseModel): """ ObjectStorageBulkDownload - """ # noqa: E501 - + """ # noqa: E501 files: List[ObjectStoragePresignedDownload] = Field(description="List of presigned downloads.") __properties: ClassVar[List[str]] = ["files"] @@ -40,6 +36,7 @@ class ObjectStorageBulkDownload(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,11 +62,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "files", - ] - ) + excluded_fields: Set[str] = set([ + "files", + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_files in self.files: if _item_files: _items.append(_item_files.to_dict()) - _dict["files"] = _items + _dict['files'] = _items return _dict @classmethod @@ -94,13 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "files": ( - [ObjectStoragePresignedDownload.from_dict(_item) for _item in obj["files"]] - if obj.get("files") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "files": [ObjectStoragePresignedDownload.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_bulk_reference.py b/saturn_api/models/object_storage_bulk_reference.py index 6e8bd76..e135055 100644 --- a/saturn_api/models/object_storage_bulk_reference.py +++ b/saturn_api/models/object_storage_bulk_reference.py @@ -1,37 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageBulkReference(BaseModel): """ ObjectStorageBulkReference - """ # noqa: E501 - - file_paths: Annotated[List[StrictStr], Field(min_length=1, max_length=1000)] = Field( - description="List of file paths in object storage." - ) + """ # noqa: E501 + file_paths: Annotated[List[StrictStr], Field(min_length=1, max_length=1000)] = Field(description="List of file paths in object storage.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the files.") __properties: ClassVar[List[str]] = ["file_paths", "owner"] @@ -41,6 +38,7 @@ class ObjectStorageBulkReference(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -86,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "file_paths": obj.get("file_paths"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "file_paths": obj.get("file_paths"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_complete_part.py b/saturn_api/models/object_storage_complete_part.py index c527328..58571e0 100644 --- a/saturn_api/models/object_storage_complete_part.py +++ b/saturn_api/models/object_storage_complete_part.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageCompletePart(BaseModel): """ ObjectStorageCompletePart - """ # noqa: E501 - + """ # noqa: E501 etag: StrictStr = Field(description="Etag of the completed part.") part_number: StrictInt = Field(description="Part number.") __properties: ClassVar[List[str]] = ["etag", "part_number"] @@ -37,6 +36,7 @@ class ObjectStorageCompletePart(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,5 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"etag": obj.get("etag"), "part_number": obj.get("part_number")}) + _obj = cls.model_validate({ + "etag": obj.get("etag"), + "part_number": obj.get("part_number") + }) return _obj + + diff --git a/saturn_api/models/object_storage_completed_upload.py b/saturn_api/models/object_storage_completed_upload.py index cdb48b0..eb6bcd0 100644 --- a/saturn_api/models/object_storage_completed_upload.py +++ b/saturn_api/models/object_storage_completed_upload.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageCompletedUpload(BaseModel): """ ObjectStorageCompletedUpload - """ # noqa: E501 - + """ # noqa: E501 parts: List[ObjectStorageCompletePart] = Field(description="List of completed upload parts.") __properties: ClassVar[List[str]] = ["parts"] @@ -38,6 +36,7 @@ class ObjectStorageCompletedUpload(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_parts in self.parts: if _item_parts: _items.append(_item_parts.to_dict()) - _dict["parts"] = _items + _dict['parts'] = _items return _dict @classmethod @@ -87,13 +87,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "parts": ( - [ObjectStorageCompletePart.from_dict(_item) for _item in obj["parts"]] - if obj.get("parts") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "parts": [ObjectStorageCompletePart.from_dict(_item) for _item in obj["parts"]] if obj.get("parts") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_copy_source.py b/saturn_api/models/object_storage_copy_source.py index 8ea077f..c2e8ebc 100644 --- a/saturn_api/models/object_storage_copy_source.py +++ b/saturn_api/models/object_storage_copy_source.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageCopySource(BaseModel): """ ObjectStorageCopySource - """ # noqa: E501 - + """ # noqa: E501 file_path: StrictStr = Field(description="File path of the source in object storage.") owner_name: StrictStr = Field(description="Name of the owner of the source.") __properties: ClassVar[List[str]] = ["file_path", "owner_name"] @@ -37,6 +36,7 @@ class ObjectStorageCopySource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,12 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "file_path", - "owner_name", - ] - ) + excluded_fields: Set[str] = set([ + "file_path", + "owner_name", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"file_path": obj.get("file_path"), "owner_name": obj.get("owner_name")} - ) + _obj = cls.model_validate({ + "file_path": obj.get("file_path"), + "owner_name": obj.get("owner_name") + }) return _obj + + diff --git a/saturn_api/models/object_storage_dir_details.py b/saturn_api/models/object_storage_dir_details.py index 7df9778..b468f40 100644 --- a/saturn_api/models/object_storage_dir_details.py +++ b/saturn_api/models/object_storage_dir_details.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageDirDetails(BaseModel): """ ObjectStorageDirDetails - """ # noqa: E501 - + """ # noqa: E501 prefix: StrictStr = Field(description="Directory path.") __properties: ClassVar[List[str]] = ["prefix"] @@ -36,6 +35,7 @@ class ObjectStorageDirDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,11 +61,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "prefix", - ] - ) + excluded_fields: Set[str] = set([ + "prefix", + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"prefix": obj.get("prefix")}) + _obj = cls.model_validate({ + "prefix": obj.get("prefix") + }) return _obj + + diff --git a/saturn_api/models/object_storage_file_details.py b/saturn_api/models/object_storage_file_details.py index c98a7e6..dab62a4 100644 --- a/saturn_api/models/object_storage_file_details.py +++ b/saturn_api/models/object_storage_file_details.py @@ -1,33 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageFileDetails(BaseModel): """ ObjectStorageFileDetails - """ # noqa: E501 - + """ # noqa: E501 file_path: StrictStr = Field(description="File path in object storage.") size: StrictInt = Field(description="Size of the file.") created_at: datetime = Field(description="Creation timestamp.") @@ -40,6 +39,7 @@ class ObjectStorageFileDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,14 +68,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "file_path", - "size", - "created_at", - "updated_at", - ] - ) + excluded_fields: Set[str] = set([ + "file_path", + "size", + "created_at", + "updated_at", + ]) _dict = self.model_dump( by_alias=True, @@ -93,12 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "file_path": obj.get("file_path"), - "size": obj.get("size"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - } - ) + _obj = cls.model_validate({ + "file_path": obj.get("file_path"), + "size": obj.get("size"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) return _obj + + diff --git a/saturn_api/models/object_storage_list.py b/saturn_api/models/object_storage_list.py index baf46d1..3a23d2d 100644 --- a/saturn_api/models/object_storage_list.py +++ b/saturn_api/models/object_storage_list.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.object_storage_dir_details import ObjectStorageDirDetails from saturn_api.models.object_storage_file_details import ObjectStorageFileDetails - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageList(BaseModel): """ ObjectStorageList - """ # noqa: E501 - + """ # noqa: E501 dirs: List[ObjectStorageDirDetails] = Field(description="List of directories.") files: List[ObjectStorageFileDetails] = Field(description="List of files.") next_last_key: Optional[StrictStr] = Field(description="Next pagination key.") @@ -41,6 +39,7 @@ class ObjectStorageList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,13 +67,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "dirs", - "files", - "next_last_key", - ] - ) + excluded_fields: Set[str] = set([ + "dirs", + "files", + "next_last_key", + ]) _dict = self.model_dump( by_alias=True, @@ -87,18 +84,18 @@ def to_dict(self) -> Dict[str, Any]: for _item_dirs in self.dirs: if _item_dirs: _items.append(_item_dirs.to_dict()) - _dict["dirs"] = _items + _dict['dirs'] = _items # override the default output from pydantic by calling `to_dict()` of each item in files (list) _items = [] if self.files: for _item_files in self.files: if _item_files: _items.append(_item_files.to_dict()) - _dict["files"] = _items + _dict['files'] = _items # set to None if next_last_key (nullable) is None # and model_fields_set contains the field if self.next_last_key is None and "next_last_key" in self.model_fields_set: - _dict["next_last_key"] = None + _dict['next_last_key'] = None return _dict @@ -111,19 +108,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "dirs": ( - [ObjectStorageDirDetails.from_dict(_item) for _item in obj["dirs"]] - if obj.get("dirs") is not None - else None - ), - "files": ( - [ObjectStorageFileDetails.from_dict(_item) for _item in obj["files"]] - if obj.get("files") is not None - else None - ), - "next_last_key": obj.get("next_last_key"), - } - ) + _obj = cls.model_validate({ + "dirs": [ObjectStorageDirDetails.from_dict(_item) for _item in obj["dirs"]] if obj.get("dirs") is not None else None, + "files": [ObjectStorageFileDetails.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None, + "next_last_key": obj.get("next_last_key") + }) return _obj + + diff --git a/saturn_api/models/object_storage_presigned_download.py b/saturn_api/models/object_storage_presigned_download.py index b82a54a..7f1b3c7 100644 --- a/saturn_api/models/object_storage_presigned_download.py +++ b/saturn_api/models/object_storage_presigned_download.py @@ -1,33 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStoragePresignedDownload(BaseModel): """ ObjectStoragePresignedDownload - """ # noqa: E501 - + """ # noqa: E501 file_path: StrictStr = Field(description="File path in object storage.") size: StrictInt = Field(description="Size of the file.") updated_at: datetime = Field(description="File updated timestamp.") @@ -40,6 +39,7 @@ class ObjectStoragePresignedDownload(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,14 +68,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "file_path", - "size", - "updated_at", - "url", - ] - ) + excluded_fields: Set[str] = set([ + "file_path", + "size", + "updated_at", + "url", + ]) _dict = self.model_dump( by_alias=True, @@ -93,12 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "file_path": obj.get("file_path"), - "size": obj.get("size"), - "updated_at": obj.get("updated_at"), - "url": obj.get("url"), - } - ) + _obj = cls.model_validate({ + "file_path": obj.get("file_path"), + "size": obj.get("size"), + "updated_at": obj.get("updated_at"), + "url": obj.get("url") + }) return _obj + + diff --git a/saturn_api/models/object_storage_presigned_part.py b/saturn_api/models/object_storage_presigned_part.py index c12c93a..45cbb6b 100644 --- a/saturn_api/models/object_storage_presigned_part.py +++ b/saturn_api/models/object_storage_presigned_part.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStoragePresignedPart(BaseModel): """ ObjectStoragePresignedPart - """ # noqa: E501 - + """ # noqa: E501 url: StrictStr = Field(description="Presigned part upload URL.") part_number: StrictInt = Field(description="Part number.") size: StrictInt = Field(description="Size of the part.") @@ -39,6 +38,7 @@ class ObjectStoragePresignedPart(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,14 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "url", - "part_number", - "size", - "headers", - ] - ) + excluded_fields: Set[str] = set([ + "url", + "part_number", + "size", + "headers", + ]) _dict = self.model_dump( by_alias=True, @@ -92,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "url": obj.get("url"), - "part_number": obj.get("part_number"), - "size": obj.get("size"), - "headers": obj.get("headers"), - } - ) + _obj = cls.model_validate({ + "url": obj.get("url"), + "part_number": obj.get("part_number"), + "size": obj.get("size"), + "headers": obj.get("headers") + }) return _obj + + diff --git a/saturn_api/models/object_storage_presigned_upload.py b/saturn_api/models/object_storage_presigned_upload.py index e0bb9a2..24e7921 100644 --- a/saturn_api/models/object_storage_presigned_upload.py +++ b/saturn_api/models/object_storage_presigned_upload.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStoragePresignedUpload(BaseModel): """ ObjectStoragePresignedUpload - """ # noqa: E501 - + """ # noqa: E501 object_storage_upload_id: StrictStr = Field(description="ID of the object storage upload.") is_copy: StrictBool = Field(description="True if upload is a copy operation.") parts: List[ObjectStoragePresignedPart] = Field(description="List of presigned upload parts.") @@ -40,6 +38,7 @@ class ObjectStoragePresignedUpload(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "object_storage_upload_id", - "is_copy", - "parts", - ] - ) + excluded_fields: Set[str] = set([ + "object_storage_upload_id", + "is_copy", + "parts", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_parts in self.parts: if _item_parts: _items.append(_item_parts.to_dict()) - _dict["parts"] = _items + _dict['parts'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "object_storage_upload_id": obj.get("object_storage_upload_id"), - "is_copy": obj.get("is_copy"), - "parts": ( - [ObjectStoragePresignedPart.from_dict(_item) for _item in obj["parts"]] - if obj.get("parts") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "object_storage_upload_id": obj.get("object_storage_upload_id"), + "is_copy": obj.get("is_copy"), + "parts": [ObjectStoragePresignedPart.from_dict(_item) for _item in obj["parts"]] if obj.get("parts") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_reference.py b/saturn_api/models/object_storage_reference.py index 303dafa..f69f9b4 100644 --- a/saturn_api/models/object_storage_reference.py +++ b/saturn_api/models/object_storage_reference.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageReference(BaseModel): """ ObjectStorageReference - """ # noqa: E501 - + """ # noqa: E501 file_path: StrictStr = Field(description="File path in object storage.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the file.") __properties: ClassVar[List[str]] = ["file_path", "owner"] @@ -39,6 +37,7 @@ class ObjectStorageReference(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -84,12 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "file_path": obj.get("file_path"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "file_path": obj.get("file_path"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_shared_owner.py b/saturn_api/models/object_storage_shared_owner.py index 44008eb..f127014 100644 --- a/saturn_api/models/object_storage_shared_owner.py +++ b/saturn_api/models/object_storage_shared_owner.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageSharedOwner(BaseModel): """ ObjectStorageSharedOwner - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the owner.") name: StrictStr = Field(description="Name of the owner.") count: StrictInt = Field(description="Count of files shared by the owner.") @@ -38,6 +37,7 @@ class ObjectStorageSharedOwner(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,13 +65,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "count", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "count", + ]) _dict = self.model_dump( by_alias=True, @@ -89,7 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"id": obj.get("id"), "name": obj.get("name"), "count": obj.get("count")} - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "count": obj.get("count") + }) return _obj + + diff --git a/saturn_api/models/object_storage_shared_owner_list.py b/saturn_api/models/object_storage_shared_owner_list.py index a683dad..05d6984 100644 --- a/saturn_api/models/object_storage_shared_owner_list.py +++ b/saturn_api/models/object_storage_shared_owner_list.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageSharedOwnerList(BaseModel): """ ObjectStorageSharedOwnerList - """ # noqa: E501 - - owners: List[ObjectStorageSharedOwner] = Field( - description="List of owners with shared object storage." - ) + """ # noqa: E501 + owners: List[ObjectStorageSharedOwner] = Field(description="List of owners with shared object storage.") next_last_key: Optional[StrictStr] = Field(description="Next pagination key.") __properties: ClassVar[List[str]] = ["owners", "next_last_key"] @@ -41,6 +37,7 @@ class ObjectStorageSharedOwnerList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "owners", - "next_last_key", - ] - ) + excluded_fields: Set[str] = set([ + "owners", + "next_last_key", + ]) _dict = self.model_dump( by_alias=True, @@ -85,11 +80,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict["owners"] = _items + _dict['owners'] = _items # set to None if next_last_key (nullable) is None # and model_fields_set contains the field if self.next_last_key is None and "next_last_key" in self.model_fields_set: - _dict["next_last_key"] = None + _dict['next_last_key'] = None return _dict @@ -102,14 +97,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "owners": ( - [ObjectStorageSharedOwner.from_dict(_item) for _item in obj["owners"]] - if obj.get("owners") is not None - else None - ), - "next_last_key": obj.get("next_last_key"), - } - ) + _obj = cls.model_validate({ + "owners": [ObjectStorageSharedOwner.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, + "next_last_key": obj.get("next_last_key") + }) return _obj + + diff --git a/saturn_api/models/object_storage_upload.py b/saturn_api/models/object_storage_upload.py index 26ef4c7..71e4c36 100644 --- a/saturn_api/models/object_storage_upload.py +++ b/saturn_api/models/object_storage_upload.py @@ -1,51 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageUpload(BaseModel): """ ObjectStorageUpload - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the object storage upload.") file_path: StrictStr = Field(description="File path of the upload in object storage.") size: Optional[StrictInt] = Field(description="Size of the file.") part_size: StrictInt = Field(description="Multipart upload size.") expires_at: datetime = Field(description="Expiration timestamp for the upload.") - copy_source: Optional[ObjectStorageCopySource] = Field( - default=None, description="Object storage copy source." - ) - __properties: ClassVar[List[str]] = [ - "id", - "file_path", - "size", - "part_size", - "expires_at", - "copy_source", - ] + copy_source: Optional[ObjectStorageCopySource] = Field(default=None, description="Object storage copy source.") + __properties: ClassVar[List[str]] = ["id", "file_path", "size", "part_size", "expires_at", "copy_source"] model_config = ConfigDict( populate_by_name=True, @@ -53,6 +42,7 @@ class ObjectStorageUpload(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,16 +73,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "file_path", - "size", - "part_size", - "expires_at", - "copy_source", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "file_path", + "size", + "part_size", + "expires_at", + "copy_source", + ]) _dict = self.model_dump( by_alias=True, @@ -101,16 +89,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of copy_source if self.copy_source: - _dict["copy_source"] = self.copy_source.to_dict() + _dict['copy_source'] = self.copy_source.to_dict() # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: - _dict["size"] = None + _dict['size'] = None # set to None if copy_source (nullable) is None # and model_fields_set contains the field if self.copy_source is None and "copy_source" in self.model_fields_set: - _dict["copy_source"] = None + _dict['copy_source'] = None return _dict @@ -123,18 +111,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "file_path": obj.get("file_path"), - "size": obj.get("size"), - "part_size": obj.get("part_size"), - "expires_at": obj.get("expires_at"), - "copy_source": ( - ObjectStorageCopySource.from_dict(obj["copy_source"]) - if obj.get("copy_source") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "file_path": obj.get("file_path"), + "size": obj.get("size"), + "part_size": obj.get("part_size"), + "expires_at": obj.get("expires_at"), + "copy_source": ObjectStorageCopySource.from_dict(obj["copy_source"]) if obj.get("copy_source") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_upload_create.py b/saturn_api/models/object_storage_upload_create.py index 8d796f2..c5954ac 100644 --- a/saturn_api/models/object_storage_upload_create.py +++ b/saturn_api/models/object_storage_upload_create.py @@ -1,46 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.object_storage_reference import ObjectStorageReference from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageUploadCreate(BaseModel): """ ObjectStorageUploadCreate - """ # noqa: E501 - + """ # noqa: E501 file_path: StrictStr = Field(description="File path in object storage.") - owner: Optional[OwnerReference] = Field( - default=None, description="Owner of the file. Defaults to authenticated user/group." - ) - size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Size of the file." - ) + owner: Optional[OwnerReference] = Field(default=None, description="Owner of the file. Defaults to authenticated user/group.") + size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size of the file.") part_size: Optional[StrictInt] = Field(default=None, description="Multipart upload size.") - copy_source: Optional[ObjectStorageReference] = Field( - default=None, description="Object storage reference to copy." - ) + copy_source: Optional[ObjectStorageReference] = Field(default=None, description="Object storage reference to copy.") __properties: ClassVar[List[str]] = ["file_path", "owner", "size", "part_size", "copy_source"] model_config = ConfigDict( @@ -49,6 +42,7 @@ class ObjectStorageUploadCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,19 +77,19 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of copy_source if self.copy_source: - _dict["copy_source"] = self.copy_source.to_dict() + _dict['copy_source'] = self.copy_source.to_dict() # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: - _dict["size"] = None + _dict['size'] = None # set to None if copy_source (nullable) is None # and model_fields_set contains the field if self.copy_source is None and "copy_source" in self.model_fields_set: - _dict["copy_source"] = None + _dict['copy_source'] = None return _dict @@ -107,19 +102,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "file_path": obj.get("file_path"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "size": obj.get("size"), - "part_size": obj.get("part_size"), - "copy_source": ( - ObjectStorageReference.from_dict(obj["copy_source"]) - if obj.get("copy_source") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "file_path": obj.get("file_path"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "size": obj.get("size"), + "part_size": obj.get("part_size"), + "copy_source": ObjectStorageReference.from_dict(obj["copy_source"]) if obj.get("copy_source") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_upload_list.py b/saturn_api/models/object_storage_upload_list.py index 08de6df..903b753 100644 --- a/saturn_api/models/object_storage_upload_list.py +++ b/saturn_api/models/object_storage_upload_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.object_storage_upload import ObjectStorageUpload - +from typing import Literal, Optional, Set +from typing_extensions import Self class ObjectStorageUploadList(BaseModel): """ ObjectStorageUploadList - """ # noqa: E501 - + """ # noqa: E501 uploads: List[ObjectStorageUpload] = Field(description="List of object storage uploads.") __properties: ClassVar[List[str]] = ["uploads"] @@ -38,6 +36,7 @@ class ObjectStorageUploadList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,11 +62,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "uploads", - ] - ) + excluded_fields: Set[str] = set([ + "uploads", + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_uploads in self.uploads: if _item_uploads: _items.append(_item_uploads.to_dict()) - _dict["uploads"] = _items + _dict['uploads'] = _items return _dict @classmethod @@ -92,13 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "uploads": ( - [ObjectStorageUpload.from_dict(_item) for _item in obj["uploads"]] - if obj.get("uploads") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "uploads": [ObjectStorageUpload.from_dict(_item) for _item in obj["uploads"]] if obj.get("uploads") is not None else None + }) return _obj + + diff --git a/saturn_api/models/object_storage_usage_stats.py b/saturn_api/models/object_storage_usage_stats.py index 0708423..111e841 100644 --- a/saturn_api/models/object_storage_usage_stats.py +++ b/saturn_api/models/object_storage_usage_stats.py @@ -1,52 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ObjectStorageUsageStats(BaseModel): """ ObjectStorageUsageStats - """ # noqa: E501 - + """ # noqa: E501 used_bytes: StrictInt = Field(description="Total used bytes in object storage.") reserved_bytes: StrictInt = Field(description="Total reserved bytes for active uploads.") file_count: StrictInt = Field(description="Number of files in object storage.") active_uploads: StrictInt = Field(description="Number of active uploads in object storage.") - max_bytes: Optional[StrictInt] = Field( - description="Maximum number of allowed object storage bytes." - ) - max_files: Optional[StrictInt] = Field( - description="Maximum number of allowed object storage files." - ) + max_bytes: Optional[StrictInt] = Field(description="Maximum number of allowed object storage bytes.") + max_files: Optional[StrictInt] = Field(description="Maximum number of allowed object storage files.") max_uploads: StrictInt = Field(description="Maximum number of allowed concurrent uploads.") - __properties: ClassVar[List[str]] = [ - "used_bytes", - "reserved_bytes", - "file_count", - "active_uploads", - "max_bytes", - "max_files", - "max_uploads", - ] + __properties: ClassVar[List[str]] = ["used_bytes", "reserved_bytes", "file_count", "active_uploads", "max_bytes", "max_files", "max_uploads"] model_config = ConfigDict( populate_by_name=True, @@ -54,6 +41,7 @@ class ObjectStorageUsageStats(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,17 +73,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "used_bytes", - "reserved_bytes", - "file_count", - "active_uploads", - "max_bytes", - "max_files", - "max_uploads", - ] - ) + excluded_fields: Set[str] = set([ + "used_bytes", + "reserved_bytes", + "file_count", + "active_uploads", + "max_bytes", + "max_files", + "max_uploads", + ]) _dict = self.model_dump( by_alias=True, @@ -105,12 +91,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if max_bytes (nullable) is None # and model_fields_set contains the field if self.max_bytes is None and "max_bytes" in self.model_fields_set: - _dict["max_bytes"] = None + _dict['max_bytes'] = None # set to None if max_files (nullable) is None # and model_fields_set contains the field if self.max_files is None and "max_files" in self.model_fields_set: - _dict["max_files"] = None + _dict['max_files'] = None return _dict @@ -123,15 +109,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "used_bytes": obj.get("used_bytes"), - "reserved_bytes": obj.get("reserved_bytes"), - "file_count": obj.get("file_count"), - "active_uploads": obj.get("active_uploads"), - "max_bytes": obj.get("max_bytes"), - "max_files": obj.get("max_files"), - "max_uploads": obj.get("max_uploads"), - } - ) + _obj = cls.model_validate({ + "used_bytes": obj.get("used_bytes"), + "reserved_bytes": obj.get("reserved_bytes"), + "file_count": obj.get("file_count"), + "active_uploads": obj.get("active_uploads"), + "max_bytes": obj.get("max_bytes"), + "max_files": obj.get("max_files"), + "max_uploads": obj.get("max_uploads") + }) return _obj + + diff --git a/saturn_api/models/org.py b/saturn_api/models/org.py index 102704c..6004f27 100644 --- a/saturn_api/models/org.py +++ b/saturn_api/models/org.py @@ -1,32 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from saturn_api.models.usage_limits import UsageLimits +from typing import Literal, Optional, Set from typing_extensions import Self - class Org(BaseModel): """ Org - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the org.") created_at: StrictStr = Field(description="Creation timestamp.") avatar_url: StrictStr = Field(description="Avatar URL for the org.") @@ -36,23 +36,11 @@ class Org(BaseModel): website_url: Optional[StrictStr] = Field(description="Website URL of the org.") logo_image_url: StrictStr = Field(description="Logo of the org.") limits_id: Optional[StrictStr] = Field(description="Usage limits ID applied to the entire org.") + limits: Optional[UsageLimits] = Field(default=None, description="Usage limits applied to the entire org, if set.") is_primary: StrictBool = Field(description="Primary org for the account.") locked: StrictBool = Field(description="Locked orgs have restricted access to the API.") locked_reason: StrictStr = Field(description="Reason for the org being locked.") - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "avatar_url", - "name", - "email", - "description", - "website_url", - "logo_image_url", - "limits_id", - "is_primary", - "locked", - "locked_reason", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "avatar_url", "name", "email", "description", "website_url", "logo_image_url", "limits_id", "limits", "is_primary", "locked", "locked_reason"] model_config = ConfigDict( populate_by_name=True, @@ -60,6 +48,7 @@ class Org(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -95,38 +84,46 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "avatar_url", - "name", - "email", - "description", - "website_url", - "logo_image_url", - "limits_id", - "is_primary", - "locked", - "locked_reason", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "avatar_url", + "name", + "email", + "description", + "website_url", + "logo_image_url", + "limits_id", + "limits", + "is_primary", + "locked", + "locked_reason", + ]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of limits + if self.limits: + _dict['limits'] = self.limits.to_dict() # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict["website_url"] = None + _dict['website_url'] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None + + # set to None if limits (nullable) is None + # and model_fields_set contains the field + if self.limits is None and "limits" in self.model_fields_set: + _dict['limits'] = None return _dict @@ -139,20 +136,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "avatar_url": obj.get("avatar_url"), - "name": obj.get("name"), - "email": obj.get("email"), - "description": obj.get("description"), - "website_url": obj.get("website_url"), - "logo_image_url": obj.get("logo_image_url"), - "limits_id": obj.get("limits_id"), - "is_primary": obj.get("is_primary"), - "locked": obj.get("locked"), - "locked_reason": obj.get("locked_reason"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "avatar_url": obj.get("avatar_url"), + "name": obj.get("name"), + "email": obj.get("email"), + "description": obj.get("description"), + "website_url": obj.get("website_url"), + "logo_image_url": obj.get("logo_image_url"), + "limits_id": obj.get("limits_id"), + "limits": UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None, + "is_primary": obj.get("is_primary"), + "locked": obj.get("locked"), + "locked_reason": obj.get("locked_reason") + }) return _obj + + diff --git a/saturn_api/models/org_create.py b/saturn_api/models/org_create.py index a7bd505..7007f99 100644 --- a/saturn_api/models/org_create.py +++ b/saturn_api/models/org_create.py @@ -1,48 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class OrgCreate(BaseModel): """ OrgCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the org.") email: StrictStr = Field(description="Email of the org.") - description: Optional[StrictStr] = Field(default="", description="Description of the org.") + description: Optional[StrictStr] = Field(default='', description="Description of the org.") website_url: Optional[StrictStr] = Field(default=None, description="Website URL of the org.") logo_image_url: Optional[StrictStr] = Field(default=None, description="Logo of the org.") - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to the entire org. (Admin only)" - ) - __properties: ClassVar[List[str]] = [ - "name", - "email", - "description", - "website_url", - "logo_image_url", - "limits_id", - ] + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the entire org. (Admin only)") + __properties: ClassVar[List[str]] = ["name", "email", "description", "website_url", "logo_image_url", "limits_id"] model_config = ConfigDict( populate_by_name=True, @@ -50,6 +40,7 @@ class OrgCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,17 +76,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict["website_url"] = None + _dict['website_url'] = None # set to None if logo_image_url (nullable) is None # and model_fields_set contains the field if self.logo_image_url is None and "logo_image_url" in self.model_fields_set: - _dict["logo_image_url"] = None + _dict['logo_image_url'] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None return _dict @@ -107,14 +99,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "email": obj.get("email"), - "description": obj.get("description") if obj.get("description") is not None else "", - "website_url": obj.get("website_url"), - "logo_image_url": obj.get("logo_image_url"), - "limits_id": obj.get("limits_id"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "email": obj.get("email"), + "description": obj.get("description") if obj.get("description") is not None else '', + "website_url": obj.get("website_url"), + "logo_image_url": obj.get("logo_image_url"), + "limits_id": obj.get("limits_id") + }) return _obj + + diff --git a/saturn_api/models/org_invitation.py b/saturn_api/models/org_invitation.py index 916591a..6afa63e 100644 --- a/saturn_api/models/org_invitation.py +++ b/saturn_api/models/org_invitation.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.invitation_status import InvitationStatus from saturn_api.models.user import User - +from typing import Literal, Optional, Set +from typing_extensions import Self class OrgInvitation(BaseModel): """ OrgInvitation - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the org invitation.") email: StrictStr = Field(description="Email that the org invitation is sent to.") invitee_name: Optional[StrictStr] = Field(description="Name of the person being invited.") @@ -40,18 +38,7 @@ class OrgInvitation(BaseModel): status: InvitationStatus expiration: Optional[StrictStr] = Field(description="Invitation expiration timestamp.") created_at: StrictStr = Field(description="Creation timestamp.") - __properties: ClassVar[List[str]] = [ - "id", - "email", - "invitee_name", - "invitor", - "invitor_name", - "org_id", - "org_name", - "status", - "expiration", - "created_at", - ] + __properties: ClassVar[List[str]] = ["id", "email", "invitee_name", "invitor", "invitor_name", "org_id", "org_name", "status", "expiration", "created_at"] model_config = ConfigDict( populate_by_name=True, @@ -59,6 +46,7 @@ class OrgInvitation(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,19 +80,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "email", - "invitee_name", - "invitor", - "invitor_name", - "org_id", - "org_name", - "expiration", - "created_at", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "email", + "invitee_name", + "invitor", + "invitor_name", + "org_id", + "org_name", + "expiration", + "created_at", + ]) _dict = self.model_dump( by_alias=True, @@ -113,26 +99,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitor if self.invitor: - _dict["invitor"] = self.invitor.to_dict() + _dict['invitor'] = self.invitor.to_dict() # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict["invitee_name"] = None + _dict['invitee_name'] = None # set to None if invitor (nullable) is None # and model_fields_set contains the field if self.invitor is None and "invitor" in self.model_fields_set: - _dict["invitor"] = None + _dict['invitor'] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict["invitor_name"] = None + _dict['invitor_name'] = None # set to None if expiration (nullable) is None # and model_fields_set contains the field if self.expiration is None and "expiration" in self.model_fields_set: - _dict["expiration"] = None + _dict['expiration'] = None return _dict @@ -145,20 +131,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor": ( - User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None - ), - "invitor_name": obj.get("invitor_name"), - "org_id": obj.get("org_id"), - "org_name": obj.get("org_name"), - "status": obj.get("status"), - "expiration": obj.get("expiration"), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor": User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None, + "invitor_name": obj.get("invitor_name"), + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "status": obj.get("status"), + "expiration": obj.get("expiration"), + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/saturn_api/models/org_invitation_create.py b/saturn_api/models/org_invitation_create.py index 29d15e2..dd4e02a 100644 --- a/saturn_api/models/org_invitation_create.py +++ b/saturn_api/models/org_invitation_create.py @@ -1,37 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class OrgInvitationCreate(BaseModel): """ OrgInvitationCreate - """ # noqa: E501 - + """ # noqa: E501 email: StrictStr = Field(description="Email that the org invitation is sent to.") invitee_name: Optional[StrictStr] = None - invitor_name: Optional[StrictStr] = Field( - default=None, description="Name of the person sending the invite." - ) + invitor_name: Optional[StrictStr] = Field(default=None, description="Name of the person sending the invite.") __properties: ClassVar[List[str]] = ["email", "invitee_name", "invitor_name"] model_config = ConfigDict( @@ -40,6 +37,7 @@ class OrgInvitationCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +73,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict["invitee_name"] = None + _dict['invitee_name'] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict["invitor_name"] = None + _dict['invitor_name'] = None return _dict @@ -92,11 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor_name": obj.get("invitor_name"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor_name": obj.get("invitor_name") + }) return _obj + + diff --git a/saturn_api/models/org_invitation_list.py b/saturn_api/models/org_invitation_list.py index 1cd3b4d..3a9c51d 100644 --- a/saturn_api/models/org_invitation_list.py +++ b/saturn_api/models/org_invitation_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.org_invitation import OrgInvitation - +from typing import Literal, Optional, Set +from typing_extensions import Self class OrgInvitationList(BaseModel): """ OrgInvitationList - """ # noqa: E501 - + """ # noqa: E501 invitations: List[OrgInvitation] = Field(description="List of org invitations.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class OrgInvitationList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "invitations", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "invitations", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_invitations in self.invitations: if _item_invitations: _items.append(_item_invitations.to_dict()) - _dict["invitations"] = _items + _dict['invitations'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitations": ( - [OrgInvitation.from_dict(_item) for _item in obj["invitations"]] - if obj.get("invitations") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "invitations": [OrgInvitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/org_invitation_update.py b/saturn_api/models/org_invitation_update.py index d88aa1c..452e977 100644 --- a/saturn_api/models/org_invitation_update.py +++ b/saturn_api/models/org_invitation_update.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.invitation_status import InvitationStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class OrgInvitationUpdate(BaseModel): """ OrgInvitationUpdate - """ # noqa: E501 - + """ # noqa: E501 status: InvitationStatus __properties: ClassVar[List[str]] = ["status"] @@ -38,6 +36,7 @@ class OrgInvitationUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"status": obj.get("status")}) + _obj = cls.model_validate({ + "status": obj.get("status") + }) return _obj + + diff --git a/saturn_api/models/org_list.py b/saturn_api/models/org_list.py index 12fbf3e..0125ba8 100644 --- a/saturn_api/models/org_list.py +++ b/saturn_api/models/org_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.org import Org - +from typing import Literal, Optional, Set +from typing_extensions import Self class OrgList(BaseModel): """ OrgList - """ # noqa: E501 - + """ # noqa: E501 orgs: List[Org] = Field(description="List of orgs.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class OrgList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "orgs", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "orgs", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_orgs in self.orgs: if _item_orgs: _items.append(_item_orgs.to_dict()) - _dict["orgs"] = _items + _dict['orgs'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "orgs": ( - [Org.from_dict(_item) for _item in obj["orgs"]] - if obj.get("orgs") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "orgs": [Org.from_dict(_item) for _item in obj["orgs"]] if obj.get("orgs") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/org_member_create.py b/saturn_api/models/org_member_create.py index 7090752..ddb3d63 100644 --- a/saturn_api/models/org_member_create.py +++ b/saturn_api/models/org_member_create.py @@ -1,39 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class OrgMemberCreate(BaseModel): """ OrgMemberCreate - """ # noqa: E501 - + """ # noqa: E501 user_id: StrictStr = Field(description="User ID to add to the org.") - org_admin: Optional[StrictBool] = Field( - default=False, description="Enable user to take privileged actions on the org." - ) - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to this org member." - ) + org_admin: Optional[StrictBool] = Field(default=False, description="Enable user to take privileged actions on the org.") + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to this org member.") __properties: ClassVar[List[str]] = ["user_id", "org_admin", "limits_id"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class OrgMemberCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None return _dict @@ -89,11 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user_id": obj.get("user_id"), - "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False, - "limits_id": obj.get("limits_id"), - } - ) + _obj = cls.model_validate({ + "user_id": obj.get("user_id"), + "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False, + "limits_id": obj.get("limits_id") + }) return _obj + + diff --git a/saturn_api/models/org_member_update.py b/saturn_api/models/org_member_update.py index 611fde5..eee1658 100644 --- a/saturn_api/models/org_member_update.py +++ b/saturn_api/models/org_member_update.py @@ -1,38 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class OrgMemberUpdate(BaseModel): """ OrgMemberUpdate - """ # noqa: E501 - - org_admin: Optional[StrictBool] = Field( - default=None, description="Enable user to take privileged actions on the org." - ) - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to this org member. (Admin only)" - ) + """ # noqa: E501 + org_admin: Optional[StrictBool] = Field(default=None, description="Enable user to take privileged actions on the org.") + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to this org member. (Admin only)") __properties: ClassVar[List[str]] = ["org_admin", "limits_id"] model_config = ConfigDict( @@ -41,6 +36,7 @@ class OrgMemberUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None return _dict @@ -88,7 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"org_admin": obj.get("org_admin"), "limits_id": obj.get("limits_id")} - ) + _obj = cls.model_validate({ + "org_admin": obj.get("org_admin"), + "limits_id": obj.get("limits_id") + }) return _obj + + diff --git a/saturn_api/models/org_update.py b/saturn_api/models/org_update.py index 14c01b2..8b0918d 100644 --- a/saturn_api/models/org_update.py +++ b/saturn_api/models/org_update.py @@ -1,48 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class OrgUpdate(BaseModel): """ OrgUpdate - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = Field(default=None, description="Email of the org.") description: Optional[StrictStr] = Field(default=None, description="Description of the org.") website_url: Optional[StrictStr] = Field(default=None, description="Website URL of the org.") logo_image_url: Optional[StrictStr] = Field(default=None, description="Logo of the org.") - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to the entire org. (Admin only)" - ) + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the entire org. (Admin only)") locked: Optional[StrictBool] = Field(default=None, description="Lock the org. (Admin only)") - __properties: ClassVar[List[str]] = [ - "email", - "description", - "website_url", - "logo_image_url", - "limits_id", - "locked", - ] + __properties: ClassVar[List[str]] = ["email", "description", "website_url", "logo_image_url", "limits_id", "locked"] model_config = ConfigDict( populate_by_name=True, @@ -50,6 +40,7 @@ class OrgUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,17 +76,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict["website_url"] = None + _dict['website_url'] = None # set to None if logo_image_url (nullable) is None # and model_fields_set contains the field if self.logo_image_url is None and "logo_image_url" in self.model_fields_set: - _dict["logo_image_url"] = None + _dict['logo_image_url'] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None return _dict @@ -107,14 +99,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "description": obj.get("description"), - "website_url": obj.get("website_url"), - "logo_image_url": obj.get("logo_image_url"), - "limits_id": obj.get("limits_id"), - "locked": obj.get("locked"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "description": obj.get("description"), + "website_url": obj.get("website_url"), + "logo_image_url": obj.get("logo_image_url"), + "limits_id": obj.get("limits_id"), + "locked": obj.get("locked") + }) return _obj + + diff --git a/saturn_api/models/orgs_list_owners200_response.py b/saturn_api/models/orgs_list_owners200_response.py index e29a76d..c9fa059 100644 --- a/saturn_api/models/orgs_list_owners200_response.py +++ b/saturn_api/models/orgs_list_owners200_response.py @@ -1,46 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.owner_detailed_list import OwnerDetailedList from saturn_api.models.owner_list import OwnerList +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar ORGSLISTOWNERS200RESPONSE_ONE_OF_SCHEMAS = ["OwnerDetailedList", "OwnerList"] T = TypeVar("T", OwnerDetailedList, OwnerList, default=Union[OwnerDetailedList, OwnerList]) - class OrgsListOwners200Response(RootModel[T]): """ OrgsListOwners200Response """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -77,3 +67,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/owner.py b/saturn_api/models/owner.py index 64ba15a..df4efc6 100644 --- a/saturn_api/models/owner.py +++ b/saturn_api/models/owner.py @@ -1,60 +1,44 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity_type import IdentityType - +from typing import Literal, Optional, Set +from typing_extensions import Self class Owner(BaseModel): """ Owner - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the owner") name: StrictStr = Field(description="Name of the owner (format: '/')") identity_name: StrictStr = Field(description="Name of the owner's identity") org_name: StrictStr = Field(description="Name of the org the owner belongs to.") created_at: StrictStr = Field(description="Creation timestamp.") - org_admin: StrictBool = Field( - description="Enable the owner to take privileged actions on its org." - ) + org_admin: StrictBool = Field(description="Enable the owner to take privileged actions on its org.") org_id: StrictStr = Field(description="Org ID the owner belongs to.") user_id: Optional[StrictStr] = Field(default=None, description="User ID of the owner.") group_id: Optional[StrictStr] = Field(default=None, description="Group ID of the owner.") identity_type: IdentityType avatar_url: StrictStr = Field(description="Avatar URL of the owner's identity.") - __properties: ClassVar[List[str]] = [ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "group_id", - "identity_type", - "avatar_url", - ] + __properties: ClassVar[List[str]] = ["id", "name", "identity_name", "org_name", "created_at", "org_admin", "org_id", "user_id", "group_id", "identity_type", "avatar_url"] model_config = ConfigDict( populate_by_name=True, @@ -62,6 +46,7 @@ class Owner(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -96,20 +81,18 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "group_id", - "avatar_url", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "group_id", + "avatar_url", + ]) _dict = self.model_dump( by_alias=True, @@ -119,12 +102,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict["user_id"] = None + _dict['user_id'] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict["group_id"] = None + _dict['group_id'] = None return _dict @@ -137,19 +120,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "identity_name": obj.get("identity_name"), - "org_name": obj.get("org_name"), - "created_at": obj.get("created_at"), - "org_admin": obj.get("org_admin"), - "org_id": obj.get("org_id"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "identity_type": obj.get("identity_type"), - "avatar_url": obj.get("avatar_url"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "identity_name": obj.get("identity_name"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "org_admin": obj.get("org_admin"), + "org_id": obj.get("org_id"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "identity_type": obj.get("identity_type"), + "avatar_url": obj.get("avatar_url") + }) return _obj + + diff --git a/saturn_api/models/owner_by_id.py b/saturn_api/models/owner_by_id.py index 89411ac..c95af73 100644 --- a/saturn_api/models/owner_by_id.py +++ b/saturn_api/models/owner_by_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class OwnerById(BaseModel): """ OwnerById - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="Reference owner by ID.") __properties: ClassVar[List[str]] = ["id"] @@ -36,6 +35,7 @@ class OwnerById(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id")}) + _obj = cls.model_validate({ + "id": obj.get("id") + }) return _obj + + diff --git a/saturn_api/models/owner_by_identity_id.py b/saturn_api/models/owner_by_identity_id.py index 546cc0e..495d20b 100644 --- a/saturn_api/models/owner_by_identity_id.py +++ b/saturn_api/models/owner_by_identity_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class OwnerByIdentityId(BaseModel): """ OwnerByIdentityId - """ # noqa: E501 - + """ # noqa: E501 user_id: Optional[StrictStr] = Field(default=None, description="Reference owner by user ID.") group_id: Optional[StrictStr] = Field(default=None, description="Reference owner by group ID.") org_id: Optional[StrictStr] = Field(default=None, description="Reference owner by org ID.") @@ -38,6 +37,7 @@ class OwnerByIdentityId(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict["user_id"] = None + _dict['user_id'] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict["group_id"] = None + _dict['group_id'] = None # set to None if org_id (nullable) is None # and model_fields_set contains the field if self.org_id is None and "org_id" in self.model_fields_set: - _dict["org_id"] = None + _dict['org_id'] = None return _dict @@ -95,11 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "org_id": obj.get("org_id"), - } - ) + _obj = cls.model_validate({ + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "org_id": obj.get("org_id") + }) return _obj + + diff --git a/saturn_api/models/owner_by_name.py b/saturn_api/models/owner_by_name.py index 609122d..b058f43 100644 --- a/saturn_api/models/owner_by_name.py +++ b/saturn_api/models/owner_by_name.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class OwnerByName(BaseModel): """ OwnerByName - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Reference owner by name.") __properties: ClassVar[List[str]] = ["name"] @@ -36,6 +35,7 @@ class OwnerByName(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/saturn_api/models/owner_detailed.py b/saturn_api/models/owner_detailed.py index e3bcf56..a178b1e 100644 --- a/saturn_api/models/owner_detailed.py +++ b/saturn_api/models/owner_detailed.py @@ -1,78 +1,53 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.group import Group from saturn_api.models.identity_type import IdentityType from saturn_api.models.org import Org from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.user_detailed import UserDetailed - +from typing import Literal, Optional, Set +from typing_extensions import Self class OwnerDetailed(BaseModel): """ OwnerDetailed - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the owner") name: StrictStr = Field(description="Name of the owner (format: '/')") identity_name: StrictStr = Field(description="Name of the owner's identity") org_name: StrictStr = Field(description="Name of the org the owner belongs to.") created_at: StrictStr = Field(description="Creation timestamp.") - org_admin: StrictBool = Field( - description="Enable the owner to take privileged actions on its org." - ) + org_admin: StrictBool = Field(description="Enable the owner to take privileged actions on its org.") org_id: StrictStr = Field(description="Org ID the owner belongs to.") user_id: Optional[StrictStr] = Field(default=None, description="User ID of the owner.") group_id: Optional[StrictStr] = Field(default=None, description="Group ID of the owner.") identity_type: IdentityType avatar_url: StrictStr = Field(description="Avatar URL of the owner's identity.") - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to the owner." - ) + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the owner.") org: Org = Field(description="Org that the owner belongs to.") user: Optional[UserDetailed] = Field(default=None, description="User identity of the owner.") group: Optional[Group] = Field(default=None, description="Group identity of the owner.") - limits: Optional[UsageLimits] = Field( - default=None, description="Usage limits applied to the owner." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "group_id", - "identity_type", - "avatar_url", - "limits_id", - "org", - "user", - "group", - "limits", - ] + limits: Optional[UsageLimits] = Field(default=None, description="Usage limits applied to the owner.") + __properties: ClassVar[List[str]] = ["id", "name", "identity_name", "org_name", "created_at", "org_admin", "org_id", "user_id", "group_id", "identity_type", "avatar_url", "limits_id", "org", "user", "group", "limits"] model_config = ConfigDict( populate_by_name=True, @@ -80,6 +55,7 @@ class OwnerDetailed(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -119,25 +95,23 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "group_id", - "avatar_url", - "limits_id", - "org", - "user", - "group", - "limits", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "group_id", + "avatar_url", + "limits_id", + "org", + "user", + "group", + "limits", + ]) _dict = self.model_dump( by_alias=True, @@ -146,45 +120,45 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of org if self.org: - _dict["org"] = self.org.to_dict() + _dict['org'] = self.org.to_dict() # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() # override the default output from pydantic by calling `to_dict()` of group if self.group: - _dict["group"] = self.group.to_dict() + _dict['group'] = self.group.to_dict() # override the default output from pydantic by calling `to_dict()` of limits if self.limits: - _dict["limits"] = self.limits.to_dict() + _dict['limits'] = self.limits.to_dict() # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict["user_id"] = None + _dict['user_id'] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict["group_id"] = None + _dict['group_id'] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None # set to None if user (nullable) is None # and model_fields_set contains the field if self.user is None and "user" in self.model_fields_set: - _dict["user"] = None + _dict['user'] = None # set to None if group (nullable) is None # and model_fields_set contains the field if self.group is None and "group" in self.model_fields_set: - _dict["group"] = None + _dict['group'] = None # set to None if limits (nullable) is None # and model_fields_set contains the field if self.limits is None and "limits" in self.model_fields_set: - _dict["limits"] = None + _dict['limits'] = None return _dict @@ -197,28 +171,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "identity_name": obj.get("identity_name"), - "org_name": obj.get("org_name"), - "created_at": obj.get("created_at"), - "org_admin": obj.get("org_admin"), - "org_id": obj.get("org_id"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "identity_type": obj.get("identity_type"), - "avatar_url": obj.get("avatar_url"), - "limits_id": obj.get("limits_id"), - "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, - "user": ( - UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None - ), - "group": Group.from_dict(obj["group"]) if obj.get("group") is not None else None, - "limits": ( - UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "identity_name": obj.get("identity_name"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "org_admin": obj.get("org_admin"), + "org_id": obj.get("org_id"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "identity_type": obj.get("identity_type"), + "avatar_url": obj.get("avatar_url"), + "limits_id": obj.get("limits_id"), + "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, + "user": UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None, + "group": Group.from_dict(obj["group"]) if obj.get("group") is not None else None, + "limits": UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None + }) return _obj + + diff --git a/saturn_api/models/owner_detailed_list.py b/saturn_api/models/owner_detailed_list.py index 15d6c4c..23297ba 100644 --- a/saturn_api/models/owner_detailed_list.py +++ b/saturn_api/models/owner_detailed_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_detailed import OwnerDetailed - +from typing import Literal, Optional, Set +from typing_extensions import Self class OwnerDetailedList(BaseModel): """ OwnerDetailedList - """ # noqa: E501 - + """ # noqa: E501 owners: List[OwnerDetailed] = Field(description="List of detailed owners.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class OwnerDetailedList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "owners", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "owners", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict["owners"] = _items + _dict['owners'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "owners": ( - [OwnerDetailed.from_dict(_item) for _item in obj["owners"]] - if obj.get("owners") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "owners": [OwnerDetailed.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/owner_list.py b/saturn_api/models/owner_list.py index 059173c..6e225f8 100644 --- a/saturn_api/models/owner_list.py +++ b/saturn_api/models/owner_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner import Owner - +from typing import Literal, Optional, Set +from typing_extensions import Self class OwnerList(BaseModel): """ OwnerList - """ # noqa: E501 - + """ # noqa: E501 owners: List[Owner] = Field(description="List of owners.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class OwnerList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "owners", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "owners", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict["owners"] = _items + _dict['owners'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "owners": ( - [Owner.from_dict(_item) for _item in obj["owners"]] - if obj.get("owners") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "owners": [Owner.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/owner_reference.py b/saturn_api/models/owner_reference.py index f7dc483..057e044 100644 --- a/saturn_api/models/owner_reference.py +++ b/saturn_api/models/owner_reference.py @@ -1,54 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Annotated, Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated from saturn_api.models.owner_by_id import OwnerById from saturn_api.models.owner_by_identity_id import OwnerByIdentityId from saturn_api.models.owner_by_name import OwnerByName +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar OWNERREFERENCE_ONE_OF_SCHEMAS = ["OwnerById", "OwnerByIdentityId", "OwnerByName", "str"] -T = TypeVar( - "T", - OwnerById, - OwnerByIdentityId, - OwnerByName, - str, - default=Union[OwnerById, OwnerByIdentityId, OwnerByName, str], -) - +T = TypeVar("T", OwnerById, OwnerByIdentityId, OwnerByName, str, default=Union[OwnerById, OwnerByIdentityId, OwnerByName, str]) class OwnerReference(RootModel[T]): """ OwnerReference """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -85,3 +69,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/owner_usage.py b/saturn_api/models/owner_usage.py index 035ce95..e7f0904 100644 --- a/saturn_api/models/owner_usage.py +++ b/saturn_api/models/owner_usage.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set, Union +import json from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional, Union from saturn_api.models.usage_owner import UsageOwner - +from typing import Literal, Optional, Set +from typing_extensions import Self class OwnerUsage(BaseModel): """ OwnerUsage - """ # noqa: E501 - + """ # noqa: E501 hours: Union[StrictFloat, StrictInt] = Field(description="Compute hours used.") dollars: Union[StrictFloat, StrictInt] = Field(description="Dollars spent.") owner: Optional[UsageOwner] = Field(default=None, description="Usage record owner identity.") @@ -40,6 +38,7 @@ class OwnerUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -85,13 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "hours": obj.get("hours"), - "dollars": obj.get("dollars"), - "owner": ( - UsageOwner.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "hours": obj.get("hours"), + "dollars": obj.get("dollars"), + "owner": UsageOwner.from_dict(obj["owner"]) if obj.get("owner") is not None else None + }) return _obj + + diff --git a/saturn_api/models/owner_usage_list.py b/saturn_api/models/owner_usage_list.py index 2343a14..6d445f1 100644 --- a/saturn_api/models/owner_usage_list.py +++ b/saturn_api/models/owner_usage_list.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_usage import OwnerUsage - +from typing import Literal, Optional, Set +from typing_extensions import Self class OwnerUsageList(BaseModel): """ OwnerUsageList - """ # noqa: E501 - - usage: Optional[List[OwnerUsage]] = Field( - default=None, description="List of owner usage records" - ) + """ # noqa: E501 + usage: Optional[List[OwnerUsage]] = Field(default=None, description="List of owner usage records") __properties: ClassVar[List[str]] = ["usage"] model_config = ConfigDict( @@ -40,6 +36,7 @@ class OwnerUsageList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_usage in self.usage: if _item_usage: _items.append(_item_usage.to_dict()) - _dict["usage"] = _items + _dict['usage'] = _items return _dict @classmethod @@ -89,13 +87,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": ( - [OwnerUsage.from_dict(_item) for _item in obj["usage"]] - if obj.get("usage") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "usage": [OwnerUsage.from_dict(_item) for _item in obj["usage"]] if obj.get("usage") is not None else None + }) return _obj + + diff --git a/saturn_api/models/owner_user_detailed.py b/saturn_api/models/owner_user_detailed.py index cffde59..1e6f938 100644 --- a/saturn_api/models/owner_user_detailed.py +++ b/saturn_api/models/owner_user_detailed.py @@ -1,73 +1,50 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity_type import IdentityType from saturn_api.models.org import Org from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.user_detailed import UserDetailed - +from typing import Literal, Optional, Set +from typing_extensions import Self class OwnerUserDetailed(BaseModel): """ OwnerUserDetailed - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the owner") name: StrictStr = Field(description="Name of the owner (format: '/')") identity_name: StrictStr = Field(description="Name of the owner's identity") org_name: StrictStr = Field(description="Name of the org the owner belongs to.") created_at: StrictStr = Field(description="Creation timestamp.") - org_admin: StrictBool = Field( - description="Enable the owner to take privileged actions on its org." - ) + org_admin: StrictBool = Field(description="Enable the owner to take privileged actions on its org.") org_id: StrictStr = Field(description="Org ID the owner belongs to.") user_id: StrictStr = Field(description="User ID of the owner.") identity_type: IdentityType avatar_url: StrictStr = Field(description="Avatar URL of the owner's identity.") - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to the owner." - ) + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the owner.") org: Org = Field(description="Org that the owner belongs to.") user: UserDetailed = Field(description="Usser identity of the owner.") - limits: Optional[UsageLimits] = Field( - default=None, description="Usage limits applied to the owner." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "identity_type", - "avatar_url", - "limits_id", - "org", - "user", - "limits", - ] + limits: Optional[UsageLimits] = Field(default=None, description="Usage limits applied to the owner.") + __properties: ClassVar[List[str]] = ["id", "name", "identity_name", "org_name", "created_at", "org_admin", "org_id", "user_id", "identity_type", "avatar_url", "limits_id", "org", "user", "limits"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +52,7 @@ class OwnerUserDetailed(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -112,23 +90,21 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "avatar_url", - "limits_id", - "org", - "user", - "limits", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "avatar_url", + "limits_id", + "org", + "user", + "limits", + ]) _dict = self.model_dump( by_alias=True, @@ -137,22 +113,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of org if self.org: - _dict["org"] = self.org.to_dict() + _dict['org'] = self.org.to_dict() # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() # override the default output from pydantic by calling `to_dict()` of limits if self.limits: - _dict["limits"] = self.limits.to_dict() + _dict['limits'] = self.limits.to_dict() # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None # set to None if limits (nullable) is None # and model_fields_set contains the field if self.limits is None and "limits" in self.model_fields_set: - _dict["limits"] = None + _dict['limits'] = None return _dict @@ -165,26 +141,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "identity_name": obj.get("identity_name"), - "org_name": obj.get("org_name"), - "created_at": obj.get("created_at"), - "org_admin": obj.get("org_admin"), - "org_id": obj.get("org_id"), - "user_id": obj.get("user_id"), - "identity_type": obj.get("identity_type"), - "avatar_url": obj.get("avatar_url"), - "limits_id": obj.get("limits_id"), - "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, - "user": ( - UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None - ), - "limits": ( - UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "identity_name": obj.get("identity_name"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "org_admin": obj.get("org_admin"), + "org_id": obj.get("org_id"), + "user_id": obj.get("user_id"), + "identity_type": obj.get("identity_type"), + "avatar_url": obj.get("avatar_url"), + "limits_id": obj.get("limits_id"), + "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, + "user": UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None, + "limits": UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None + }) return _obj + + diff --git a/saturn_api/models/pod_history.py b/saturn_api/models/pod_history.py index 4761241..6b4c1d2 100644 --- a/saturn_api/models/pod_history.py +++ b/saturn_api/models/pod_history.py @@ -1,46 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class PodHistory(BaseModel): """ PodHistory - """ # noqa: E501 - + """ # noqa: E501 pod_name: StrictStr = Field(description="Name of the pod.") status: StrictStr = Field(description="Last known status of the pod.") last_seen: StrictStr = Field(description="Last seen timestamp of the pod.") start_time: Optional[StrictStr] = Field(description="Start time of the pod.") - label_job_name: Optional[StrictStr] = Field( - default=None, description="Job label, if applicable." - ) - __properties: ClassVar[List[str]] = [ - "pod_name", - "status", - "last_seen", - "start_time", - "label_job_name", - ] + label_job_name: Optional[StrictStr] = Field(default=None, description="Job label, if applicable.") + __properties: ClassVar[List[str]] = ["pod_name", "status", "last_seen", "start_time", "label_job_name"] model_config = ConfigDict( populate_by_name=True, @@ -48,6 +39,7 @@ class PodHistory(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,15 +69,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "pod_name", - "status", - "last_seen", - "start_time", - "label_job_name", - ] - ) + excluded_fields: Set[str] = set([ + "pod_name", + "status", + "last_seen", + "start_time", + "label_job_name", + ]) _dict = self.model_dump( by_alias=True, @@ -95,12 +85,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if start_time (nullable) is None # and model_fields_set contains the field if self.start_time is None and "start_time" in self.model_fields_set: - _dict["start_time"] = None + _dict['start_time'] = None # set to None if label_job_name (nullable) is None # and model_fields_set contains the field if self.label_job_name is None and "label_job_name" in self.model_fields_set: - _dict["label_job_name"] = None + _dict['label_job_name'] = None return _dict @@ -113,13 +103,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pod_name": obj.get("pod_name"), - "status": obj.get("status"), - "last_seen": obj.get("last_seen"), - "start_time": obj.get("start_time"), - "label_job_name": obj.get("label_job_name"), - } - ) + _obj = cls.model_validate({ + "pod_name": obj.get("pod_name"), + "status": obj.get("status"), + "last_seen": obj.get("last_seen"), + "start_time": obj.get("start_time"), + "label_job_name": obj.get("label_job_name") + }) return _obj + + diff --git a/saturn_api/models/pod_logs.py b/saturn_api/models/pod_logs.py index 0196238..7609b1a 100644 --- a/saturn_api/models/pod_logs.py +++ b/saturn_api/models/pod_logs.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class PodLogs(BaseModel): """ PodLogs - """ # noqa: E501 - + """ # noqa: E501 logs: StrictStr = Field(description="Log lines from the active pod.") __properties: ClassVar[List[str]] = ["logs"] @@ -36,6 +35,7 @@ class PodLogs(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,11 +61,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "logs", - ] - ) + excluded_fields: Set[str] = set([ + "logs", + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"logs": obj.get("logs")}) + _obj = cls.model_validate({ + "logs": obj.get("logs") + }) return _obj + + diff --git a/saturn_api/models/pod_runtime_summary.py b/saturn_api/models/pod_runtime_summary.py index f955f26..714ef2a 100644 --- a/saturn_api/models/pod_runtime_summary.py +++ b/saturn_api/models/pod_runtime_summary.py @@ -1,37 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.condition import Condition from saturn_api.models.container_runtime_summary import ContainerRuntimeSummary from saturn_api.models.pod_status import PodStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class PodRuntimeSummary(BaseModel): """ PodRuntimeSummary - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr namespace: StrictStr uid: StrictStr @@ -47,33 +45,16 @@ class PodRuntimeSummary(BaseModel): container_summaries: List[ContainerRuntimeSummary] node_name: Optional[StrictStr] completed_at: Optional[datetime] - reason: Literal["Evicted", "OOMKilled"] | None - __properties: ClassVar[List[str]] = [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "status", - "init_container_summaries", - "container_summaries", - "node_name", - "completed_at", - "reason", - ] - - @field_validator("reason") + reason: Literal['Evicted', 'OOMKilled'] | None + __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "init_container_summaries", "container_summaries", "node_name", "completed_at", "reason"] + + @field_validator('reason') def reason_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["Evicted", "OOMKilled"]): + if value not in set(['Evicted', 'OOMKilled']): raise ValueError("must be one of enum values ('Evicted', 'OOMKilled')") return value @@ -83,6 +64,7 @@ def reason_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -122,25 +104,23 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "init_container_summaries", - "container_summaries", - "node_name", - "completed_at", - "reason", - ] - ) + excluded_fields: Set[str] = set([ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "init_container_summaries", + "container_summaries", + "node_name", + "completed_at", + "reason", + ]) _dict = self.model_dump( by_alias=True, @@ -153,55 +133,55 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict["conditions"] = _items + _dict['conditions'] = _items # override the default output from pydantic by calling `to_dict()` of each item in init_container_summaries (list) _items = [] if self.init_container_summaries: for _item_init_container_summaries in self.init_container_summaries: if _item_init_container_summaries: _items.append(_item_init_container_summaries.to_dict()) - _dict["init_container_summaries"] = _items + _dict['init_container_summaries'] = _items # override the default output from pydantic by calling `to_dict()` of each item in container_summaries (list) _items = [] if self.container_summaries: for _item_container_summaries in self.container_summaries: if _item_container_summaries: _items.append(_item_container_summaries.to_dict()) - _dict["container_summaries"] = _items + _dict['container_summaries'] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict["controller_uid"] = None + _dict['controller_uid'] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict["controller_kind"] = None + _dict['controller_kind'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict["deleted_at"] = None + _dict['deleted_at'] = None # set to None if node_name (nullable) is None # and model_fields_set contains the field if self.node_name is None and "node_name" in self.model_fields_set: - _dict["node_name"] = None + _dict['node_name'] = None # set to None if completed_at (nullable) is None # and model_fields_set contains the field if self.completed_at is None and "completed_at" in self.model_fields_set: - _dict["completed_at"] = None + _dict['completed_at'] = None # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: - _dict["reason"] = None + _dict['reason'] = None return _dict @@ -214,42 +194,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": ( - [Condition.from_dict(_item) for _item in obj["conditions"]] - if obj.get("conditions") is not None - else None - ), - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "init_container_summaries": ( - [ - ContainerRuntimeSummary.from_dict(_item) - for _item in obj["init_container_summaries"] - ] - if obj.get("init_container_summaries") is not None - else None - ), - "container_summaries": ( - [ - ContainerRuntimeSummary.from_dict(_item) - for _item in obj["container_summaries"] - ] - if obj.get("container_summaries") is not None - else None - ), - "node_name": obj.get("node_name"), - "completed_at": obj.get("completed_at"), - "reason": obj.get("reason"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "init_container_summaries": [ContainerRuntimeSummary.from_dict(_item) for _item in obj["init_container_summaries"]] if obj.get("init_container_summaries") is not None else None, + "container_summaries": [ContainerRuntimeSummary.from_dict(_item) for _item in obj["container_summaries"]] if obj.get("container_summaries") is not None else None, + "node_name": obj.get("node_name"), + "completed_at": obj.get("completed_at"), + "reason": obj.get("reason") + }) return _obj + + diff --git a/saturn_api/models/pod_runtime_summary_list.py b/saturn_api/models/pod_runtime_summary_list.py index 26e9eba..93ef84b 100644 --- a/saturn_api/models/pod_runtime_summary_list.py +++ b/saturn_api/models/pod_runtime_summary_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.pod_runtime_summary import PodRuntimeSummary - +from typing import Literal, Optional, Set +from typing_extensions import Self class PodRuntimeSummaryList(BaseModel): """ PodRuntimeSummaryList - """ # noqa: E501 - + """ # noqa: E501 pod_summaries: List[PodRuntimeSummary] = Field(description="List of pod summaries.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class PodRuntimeSummaryList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "pod_summaries", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "pod_summaries", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_pod_summaries in self.pod_summaries: if _item_pod_summaries: _items.append(_item_pod_summaries.to_dict()) - _dict["pod_summaries"] = _items + _dict['pod_summaries'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pod_summaries": ( - [PodRuntimeSummary.from_dict(_item) for _item in obj["pod_summaries"]] - if obj.get("pod_summaries") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "pod_summaries": [PodRuntimeSummary.from_dict(_item) for _item in obj["pod_summaries"]] if obj.get("pod_summaries") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/pod_status.py b/saturn_api/models/pod_status.py index 6fa12f4..bb902d7 100644 --- a/saturn_api/models/pod_status.py +++ b/saturn_api/models/pod_status.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,15 +26,17 @@ class PodStatus(str, Enum): """ allowed enum values """ - PENDING = "pending" - RUNNING = "running" - ERROR = "error" - STOPPING = "stopping" - STOPPED = "stopped" - COMPLETED = "completed" - UNKNOWN = "unknown" + PENDING = 'pending' + RUNNING = 'running' + ERROR = 'error' + STOPPING = 'stopping' + STOPPED = 'stopped' + COMPLETED = 'completed' + UNKNOWN = 'unknown' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PodStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/recipe.py b/saturn_api/models/recipe.py index dfd521a..67e7d6d 100644 --- a/saturn_api/models/recipe.py +++ b/saturn_api/models/recipe.py @@ -1,55 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.deployment_recipe import DeploymentRecipe from saturn_api.models.image_recipe import ImageRecipe from saturn_api.models.job_recipe import JobRecipe from saturn_api.models.workspace_recipe import WorkspaceRecipe +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar RECIPE_ONE_OF_SCHEMAS = ["DeploymentRecipe", "ImageRecipe", "JobRecipe", "WorkspaceRecipe"] -T = TypeVar( - "T", - DeploymentRecipe, - ImageRecipe, - JobRecipe, - WorkspaceRecipe, - default=Union[DeploymentRecipe, ImageRecipe, JobRecipe, WorkspaceRecipe], -) - +T = TypeVar("T", DeploymentRecipe, ImageRecipe, JobRecipe, WorkspaceRecipe, default=Union[DeploymentRecipe, ImageRecipe, JobRecipe, WorkspaceRecipe]) class Recipe(RootModel[T]): """ Recipe """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -86,3 +69,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/recipe_list.py b/saturn_api/models/recipe_list.py index 78828f4..ab7272f 100644 --- a/saturn_api/models/recipe_list.py +++ b/saturn_api/models/recipe_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.recipe import Recipe - +from typing import Literal, Optional, Set +from typing_extensions import Self class RecipeList(BaseModel): """ RecipeList - """ # noqa: E501 - + """ # noqa: E501 recipes: List[Recipe] prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class RecipeList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "recipes", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "recipes", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_recipes in self.recipes: if _item_recipes: _items.append(_item_recipes.to_dict()) - _dict["recipes"] = _items + _dict['recipes'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "recipes": ( - [Recipe.from_dict(_item) for _item in obj["recipes"]] - if obj.get("recipes") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "recipes": [Recipe.from_dict(_item) for _item in obj["recipes"]] if obj.get("recipes") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/resource.py b/saturn_api/models/resource.py index cc97e0e..2c8ac15 100644 --- a/saturn_api/models/resource.py +++ b/saturn_api/models/resource.py @@ -1,55 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.dask_cluster import DaskCluster from saturn_api.models.deployment import Deployment from saturn_api.models.job import Job from saturn_api.models.workspace import Workspace +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar RESOURCE_ONE_OF_SCHEMAS = ["DaskCluster", "Deployment", "Job", "Workspace"] -T = TypeVar( - "T", - DaskCluster, - Deployment, - Job, - Workspace, - default=Union[DaskCluster, Deployment, Job, Workspace], -) - +T = TypeVar("T", DaskCluster, Deployment, Job, Workspace, default=Union[DaskCluster, Deployment, Job, Workspace]) class Resource(RootModel[T]): """ Resource """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -86,3 +69,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/resource_by_deployment_id.py b/saturn_api/models/resource_by_deployment_id.py index 98d06bf..5c1ba8e 100644 --- a/saturn_api/models/resource_by_deployment_id.py +++ b/saturn_api/models/resource_by_deployment_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceByDeploymentId(BaseModel): """ ResourceByDeploymentId - """ # noqa: E501 - + """ # noqa: E501 deployment_id: StrictStr = Field(description="Reference by deployment ID.") __properties: ClassVar[List[str]] = ["deployment_id"] @@ -36,6 +35,7 @@ class ResourceByDeploymentId(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"deployment_id": obj.get("deployment_id")}) + _obj = cls.model_validate({ + "deployment_id": obj.get("deployment_id") + }) return _obj + + diff --git a/saturn_api/models/resource_by_job_id.py b/saturn_api/models/resource_by_job_id.py index 12cf87c..79436d7 100644 --- a/saturn_api/models/resource_by_job_id.py +++ b/saturn_api/models/resource_by_job_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceByJobId(BaseModel): """ ResourceByJobId - """ # noqa: E501 - + """ # noqa: E501 job_id: StrictStr = Field(description="Reference by job ID.") __properties: ClassVar[List[str]] = ["job_id"] @@ -36,6 +35,7 @@ class ResourceByJobId(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"job_id": obj.get("job_id")}) + _obj = cls.model_validate({ + "job_id": obj.get("job_id") + }) return _obj + + diff --git a/saturn_api/models/resource_by_workspace_id.py b/saturn_api/models/resource_by_workspace_id.py index 4dbc3a8..027be6b 100644 --- a/saturn_api/models/resource_by_workspace_id.py +++ b/saturn_api/models/resource_by_workspace_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceByWorkspaceId(BaseModel): """ ResourceByWorkspaceId - """ # noqa: E501 - + """ # noqa: E501 workspace_id: StrictStr = Field(description="Reference by workspace ID.") __properties: ClassVar[List[str]] = ["workspace_id"] @@ -36,6 +35,7 @@ class ResourceByWorkspaceId(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"workspace_id": obj.get("workspace_id")}) + _obj = cls.model_validate({ + "workspace_id": obj.get("workspace_id") + }) return _obj + + diff --git a/saturn_api/models/resource_clusters.py b/saturn_api/models/resource_clusters.py index 795a556..a7369ad 100644 --- a/saturn_api/models/resource_clusters.py +++ b/saturn_api/models/resource_clusters.py @@ -1,35 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceClusters(BaseModel): """ ResourceClusters - """ # noqa: E501 - - clusters: List[Optional[StrictStr]] = Field( - description="List of clusters the resource has run on." - ) + """ # noqa: E501 + clusters: List[Optional[StrictStr]] = Field(description="List of clusters the resource has run on.") __properties: ClassVar[List[str]] = ["clusters"] model_config = ConfigDict( @@ -38,6 +35,7 @@ class ResourceClusters(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,11 +61,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "clusters", - ] - ) + excluded_fields: Set[str] = set([ + "clusters", + ]) _dict = self.model_dump( by_alias=True, @@ -85,5 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"clusters": obj.get("clusters")}) + _obj = cls.model_validate({ + "clusters": obj.get("clusters") + }) return _obj + + diff --git a/saturn_api/models/resource_history.py b/saturn_api/models/resource_history.py index aa579e8..13cacfa 100644 --- a/saturn_api/models/resource_history.py +++ b/saturn_api/models/resource_history.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.pod_history import PodHistory - +from typing import Literal, Optional, Set +from typing_extensions import Self class ResourceHistory(BaseModel): """ ResourceHistory - """ # noqa: E501 - + """ # noqa: E501 pods: List[PodHistory] = Field(description="List of pod history.") __properties: ClassVar[List[str]] = ["pods"] @@ -38,6 +36,7 @@ class ResourceHistory(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,11 +62,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "pods", - ] - ) + excluded_fields: Set[str] = set([ + "pods", + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_pods in self.pods: if _item_pods: _items.append(_item_pods.to_dict()) - _dict["pods"] = _items + _dict['pods'] = _items return _dict @classmethod @@ -92,13 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pods": ( - [PodHistory.from_dict(_item) for _item in obj["pods"]] - if obj.get("pods") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "pods": [PodHistory.from_dict(_item) for _item in obj["pods"]] if obj.get("pods") is not None else None + }) return _obj + + diff --git a/saturn_api/models/resource_recipe.py b/saturn_api/models/resource_recipe.py index d832a3d..a63d168 100644 --- a/saturn_api/models/resource_recipe.py +++ b/saturn_api/models/resource_recipe.py @@ -1,53 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.deployment_recipe import DeploymentRecipe from saturn_api.models.job_recipe import JobRecipe from saturn_api.models.workspace_recipe import WorkspaceRecipe +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar RESOURCERECIPE_ONE_OF_SCHEMAS = ["DeploymentRecipe", "JobRecipe", "WorkspaceRecipe"] -T = TypeVar( - "T", - DeploymentRecipe, - JobRecipe, - WorkspaceRecipe, - default=Union[DeploymentRecipe, JobRecipe, WorkspaceRecipe], -) - +T = TypeVar("T", DeploymentRecipe, JobRecipe, WorkspaceRecipe, default=Union[DeploymentRecipe, JobRecipe, WorkspaceRecipe]) class ResourceRecipe(RootModel[T]): """ ResourceRecipe """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -84,3 +68,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/resource_reference.py b/saturn_api/models/resource_reference.py index 9054a4e..abf7740 100644 --- a/saturn_api/models/resource_reference.py +++ b/saturn_api/models/resource_reference.py @@ -1,57 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.resource_by_deployment_id import ResourceByDeploymentId from saturn_api.models.resource_by_job_id import ResourceByJobId from saturn_api.models.resource_by_workspace_id import ResourceByWorkspaceId +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar -RESOURCEREFERENCE_ONE_OF_SCHEMAS = [ - "ResourceByDeploymentId", - "ResourceByJobId", - "ResourceByWorkspaceId", -] - -T = TypeVar( - "T", - ResourceByDeploymentId, - ResourceByJobId, - ResourceByWorkspaceId, - default=Union[ResourceByDeploymentId, ResourceByJobId, ResourceByWorkspaceId], -) +RESOURCEREFERENCE_ONE_OF_SCHEMAS = ["ResourceByDeploymentId", "ResourceByJobId", "ResourceByWorkspaceId"] +T = TypeVar("T", ResourceByDeploymentId, ResourceByJobId, ResourceByWorkspaceId, default=Union[ResourceByDeploymentId, ResourceByJobId, ResourceByWorkspaceId]) class ResourceReference(RootModel[T]): """ ResourceReference """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -88,3 +68,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/resource_state.py b/saturn_api/models/resource_state.py index 508822c..f4b5c9f 100644 --- a/saturn_api/models/resource_state.py +++ b/saturn_api/models/resource_state.py @@ -1,36 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from saturn_api.models.route_state import RouteState +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceState(BaseModel): """ ResourceState - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr action: Optional[StrictStr] = None status: StrictStr - __properties: ClassVar[List[str]] = ["id", "action", "status"] + url: Optional[StrictStr] = Field(default=None, description="External URL for the primary route, if applicable.") + ssh_url: Optional[StrictStr] = Field(default=None, description="External SSH URL for the resource when SSH is enabled.") + ssh_user: Optional[StrictStr] = Field(default=None, description="SSH username for the resource when SSH is enabled.") + routes: Optional[List[RouteState]] = Field(default=None, description="External URL for each route exposed by the resource.") + __properties: ClassVar[List[str]] = ["id", "action", "status", "url", "ssh_url", "ssh_user", "routes"] model_config = ConfigDict( populate_by_name=True, @@ -38,6 +42,7 @@ class ResourceState(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,20 +69,48 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "action", - "status", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "action", + "status", + "url", + "ssh_url", + "ssh_user", + "routes", + ]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in routes (list) + _items = [] + if self.routes: + for _item_routes in self.routes: + if _item_routes: + _items.append(_item_routes.to_dict()) + _dict['routes'] = _items + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if ssh_url (nullable) is None + # and model_fields_set contains the field + if self.ssh_url is None and "ssh_url" in self.model_fields_set: + _dict['ssh_url'] = None + + # set to None if ssh_user (nullable) is None + # and model_fields_set contains the field + if self.ssh_user is None and "ssh_user" in self.model_fields_set: + _dict['ssh_user'] = None + return _dict @classmethod @@ -89,7 +122,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"id": obj.get("id"), "action": obj.get("action"), "status": obj.get("status")} - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action"), + "status": obj.get("status"), + "url": obj.get("url"), + "ssh_url": obj.get("ssh_url"), + "ssh_user": obj.get("ssh_user"), + "routes": [RouteState.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None + }) return _obj + + diff --git a/saturn_api/models/resource_template.py b/saturn_api/models/resource_template.py index 9d51045..ab94ee1 100644 --- a/saturn_api/models/resource_template.py +++ b/saturn_api/models/resource_template.py @@ -1,66 +1,45 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner import Owner from saturn_api.models.resource_template_access_level import ResourceTemplateAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class ResourceTemplate(BaseModel): """ ResourceTemplate - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the resource template.") name: StrictStr = Field(description="Name of the resource template.") owner: Owner = Field(description="Owner of the resource template.") description: StrictStr = Field(description="Description of the resource template.") created_at: StrictStr = Field(description="Creation timestamp") - thumbnail_image_url: Optional[StrictStr] = Field( - description="Thumbnail image URL to display with the resource template." - ) + thumbnail_image_url: Optional[StrictStr] = Field(description="Thumbnail image URL to display with the resource template.") weight: Optional[StrictInt] = Field(description="Gallery ordering weight.") recipe: Dict[str, Any] = Field(description="Resource recipe to apply.") access: ResourceTemplateAccessLevel - in_gallery: Optional[StrictBool] = Field( - default=None, - description="Enable displaying the resource template in the dashboard gallery.", - ) - editable: StrictBool = Field( - description="True if the resource template is editable by the authenticated user/group." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "description", - "created_at", - "thumbnail_image_url", - "weight", - "recipe", - "access", - "in_gallery", - "editable", - ] + in_gallery: Optional[StrictBool] = Field(default=None, description="Enable displaying the resource template in the dashboard gallery.") + editable: StrictBool = Field(description="True if the resource template is editable by the authenticated user/group.") + __properties: ClassVar[List[str]] = ["id", "name", "owner", "description", "created_at", "thumbnail_image_url", "weight", "recipe", "access", "in_gallery", "editable"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +47,7 @@ class ResourceTemplate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -101,19 +81,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "description", - "created_at", - "thumbnail_image_url", - "weight", - "recipe", - "editable", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "description", + "created_at", + "thumbnail_image_url", + "weight", + "recipe", + "editable", + ]) _dict = self.model_dump( by_alias=True, @@ -122,16 +100,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # set to None if thumbnail_image_url (nullable) is None # and model_fields_set contains the field if self.thumbnail_image_url is None and "thumbnail_image_url" in self.model_fields_set: - _dict["thumbnail_image_url"] = None + _dict['thumbnail_image_url'] = None # set to None if weight (nullable) is None # and model_fields_set contains the field if self.weight is None and "weight" in self.model_fields_set: - _dict["weight"] = None + _dict['weight'] = None return _dict @@ -144,19 +122,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "thumbnail_image_url": obj.get("thumbnail_image_url"), - "weight": obj.get("weight"), - "recipe": obj.get("recipe"), - "access": obj.get("access"), - "in_gallery": obj.get("in_gallery"), - "editable": obj.get("editable"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "thumbnail_image_url": obj.get("thumbnail_image_url"), + "weight": obj.get("weight"), + "recipe": obj.get("recipe"), + "access": obj.get("access"), + "in_gallery": obj.get("in_gallery"), + "editable": obj.get("editable") + }) return _obj + + diff --git a/saturn_api/models/resource_template_access_level.py b/saturn_api/models/resource_template_access_level.py index d18c6f1..80c5d23 100644 --- a/saturn_api/models/resource_template_access_level.py +++ b/saturn_api/models/resource_template_access_level.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class ResourceTemplateAccessLevel(str, Enum): """ allowed enum values """ - ACCOUNT = "account" - ORG = "org" - OWNER = "owner" + ACCOUNT = 'account' + ORG = 'org' + OWNER = 'owner' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ResourceTemplateAccessLevel from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/resource_token_info.py b/saturn_api/models/resource_token_info.py index 1f515b1..c66c547 100644 --- a/saturn_api/models/resource_token_info.py +++ b/saturn_api/models/resource_token_info.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceTokenInfo(BaseModel): """ ResourceTokenInfo - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the token.") scope: Optional[StrictStr] = Field(description="Permission scope of the token.") __properties: ClassVar[List[str]] = ["id", "scope"] @@ -37,6 +36,7 @@ class ResourceTokenInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict["scope"] = None + _dict['scope'] = None return _dict @@ -84,5 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "scope": obj.get("scope")}) + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope": obj.get("scope") + }) return _obj + + diff --git a/saturn_api/models/resource_token_update.py b/saturn_api/models/resource_token_update.py index e9d4e35..53bd3f6 100644 --- a/saturn_api/models/resource_token_update.py +++ b/saturn_api/models/resource_token_update.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ResourceTokenUpdate(BaseModel): """ ResourceTokenUpdate - """ # noqa: E501 - + """ # noqa: E501 scope: Optional[StrictStr] = Field(description="Permission scope of the token.") __properties: ClassVar[List[str]] = ["scope"] @@ -36,6 +35,7 @@ class ResourceTokenUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -70,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict["scope"] = None + _dict['scope'] = None return _dict @@ -83,5 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"scope": obj.get("scope")}) + _obj = cls.model_validate({ + "scope": obj.get("scope") + }) return _obj + + diff --git a/saturn_api/models/resource_type.py b/saturn_api/models/resource_type.py index 72a233c..19ca0e6 100644 --- a/saturn_api/models/resource_type.py +++ b/saturn_api/models/resource_type.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,12 +26,14 @@ class ResourceType(str, Enum): """ allowed enum values """ - DEPLOYMENT = "deployment" - JOB = "job" - WORKSPACE = "workspace" - DASK = "dask" + DEPLOYMENT = 'deployment' + JOB = 'job' + WORKSPACE = 'workspace' + DASK = 'dask' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ResourceType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/restart_policy.py b/saturn_api/models/restart_policy.py index 3844685..f8c682e 100644 --- a/saturn_api/models/restart_policy.py +++ b/saturn_api/models/restart_policy.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,11 +26,13 @@ class RestartPolicy(str, Enum): """ allowed enum values """ - ALWAYS = "Always" - NEVER = "Never" - ONFAILURE = "OnFailure" + ALWAYS = 'Always' + NEVER = 'Never' + ONFAILURE = 'OnFailure' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RestartPolicy from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/route.py b/saturn_api/models/route.py index fa03d25..c8ca154 100644 --- a/saturn_api/models/route.py +++ b/saturn_api/models/route.py @@ -1,58 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class Route(BaseModel): """ Route - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr subdomain: StrictStr = Field(description="Subdomain of the route.") container_port: StrictInt = Field(description="Exposed port in the container.") visibility: StrictStr = Field(description="Describes who is allowed to access the route.") url: StrictStr = Field(description="Full URL of the route.") required: StrictBool = Field(description="True if the route is required for the resource.") - daskcluster_id: Optional[StrictStr] = Field( - default=None, description="Dask cluster ID the route is attached to." - ) - deployment_id: Optional[StrictStr] = Field( - default=None, description="Deployment ID the route is attached to." - ) - workspace_id: Optional[StrictStr] = Field( - default=None, description="Workspace ID the route is attached to." - ) - __properties: ClassVar[List[str]] = [ - "id", - "subdomain", - "container_port", - "visibility", - "url", - "required", - "daskcluster_id", - "deployment_id", - "workspace_id", - ] + daskcluster_id: Optional[StrictStr] = Field(default=None, description="Dask cluster ID the route is attached to.") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID the route is attached to.") + workspace_id: Optional[StrictStr] = Field(default=None, description="Workspace ID the route is attached to.") + __properties: ClassVar[List[str]] = ["id", "subdomain", "container_port", "visibility", "url", "required", "daskcluster_id", "deployment_id", "workspace_id"] model_config = ConfigDict( populate_by_name=True, @@ -60,6 +43,7 @@ class Route(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -93,19 +77,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "subdomain", - "container_port", - "visibility", - "url", - "required", - "daskcluster_id", - "deployment_id", - "workspace_id", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "subdomain", + "container_port", + "visibility", + "url", + "required", + "daskcluster_id", + "deployment_id", + "workspace_id", + ]) _dict = self.model_dump( by_alias=True, @@ -123,17 +105,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility"), - "url": obj.get("url"), - "required": obj.get("required"), - "daskcluster_id": obj.get("daskcluster_id"), - "deployment_id": obj.get("deployment_id"), - "workspace_id": obj.get("workspace_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility"), + "url": obj.get("url"), + "required": obj.get("required"), + "daskcluster_id": obj.get("daskcluster_id"), + "deployment_id": obj.get("deployment_id"), + "workspace_id": obj.get("workspace_id") + }) return _obj + + diff --git a/saturn_api/models/route_by_container_port.py b/saturn_api/models/route_by_container_port.py index 4ba66c3..d9083d7 100644 --- a/saturn_api/models/route_by_container_port.py +++ b/saturn_api/models/route_by_container_port.py @@ -1,32 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class RouteByContainerPort(BaseModel): """ RouteByContainerPort - """ # noqa: E501 - + """ # noqa: E501 container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] __properties: ClassVar[List[str]] = ["container_port"] @@ -36,6 +36,7 @@ class RouteByContainerPort(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"container_port": obj.get("container_port")}) + _obj = cls.model_validate({ + "container_port": obj.get("container_port") + }) return _obj + + diff --git a/saturn_api/models/route_by_id.py b/saturn_api/models/route_by_id.py index b556252..5f95b27 100644 --- a/saturn_api/models/route_by_id.py +++ b/saturn_api/models/route_by_id.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class RouteById(BaseModel): """ RouteById - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr __properties: ClassVar[List[str]] = ["id"] @@ -36,6 +35,7 @@ class RouteById(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id")}) + _obj = cls.model_validate({ + "id": obj.get("id") + }) return _obj + + diff --git a/saturn_api/models/route_by_subdomain.py b/saturn_api/models/route_by_subdomain.py index 87d01f9..d70dead 100644 --- a/saturn_api/models/route_by_subdomain.py +++ b/saturn_api/models/route_by_subdomain.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class RouteBySubdomain(BaseModel): """ RouteBySubdomain - """ # noqa: E501 - + """ # noqa: E501 subdomain: StrictStr __properties: ClassVar[List[str]] = ["subdomain"] @@ -36,6 +35,7 @@ class RouteBySubdomain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"subdomain": obj.get("subdomain")}) + _obj = cls.model_validate({ + "subdomain": obj.get("subdomain") + }) return _obj + + diff --git a/saturn_api/models/route_create.py b/saturn_api/models/route_create.py index f966af7..b5f922c 100644 --- a/saturn_api/models/route_create.py +++ b/saturn_api/models/route_create.py @@ -1,49 +1,45 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class RouteCreate(BaseModel): """ RouteCreate - """ # noqa: E501 - + """ # noqa: E501 subdomain: StrictStr = Field(description="Subdomain of the route.") - container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] = Field( - description="Exposed port in the container." - ) - visibility: Literal["unauthenticated", "account", "org", "owner"] | None = None + container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] = Field(description="Exposed port in the container.") + visibility: Literal['unauthenticated', 'account', 'org', 'owner'] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator("visibility") + @field_validator('visibility') def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["unauthenticated", "account", "org", "owner"]): - raise ValueError( - "must be one of enum values ('unauthenticated', 'account', 'org', 'owner')" - ) + if value not in set(['unauthenticated', 'account', 'org', 'owner']): + raise ValueError("must be one of enum values ('unauthenticated', 'account', 'org', 'owner')") return value model_config = ConfigDict( @@ -52,6 +48,7 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility"), - } - ) + _obj = cls.model_validate({ + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility") + }) return _obj + + diff --git a/saturn_api/models/route_list.py b/saturn_api/models/route_list.py index 7e7c444..f4f2d40 100644 --- a/saturn_api/models/route_list.py +++ b/saturn_api/models/route_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.route import Route - +from typing import Literal, Optional, Set +from typing_extensions import Self class RouteList(BaseModel): """ RouteList - """ # noqa: E501 - + """ # noqa: E501 routes: List[Route] = Field(description="List of routes.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class RouteList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "routes", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "routes", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict["routes"] = _items + _dict['routes'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "routes": ( - [Route.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "routes": [Route.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/route_reference.py b/saturn_api/models/route_reference.py index 64f7af9..5b12220 100644 --- a/saturn_api/models/route_reference.py +++ b/saturn_api/models/route_reference.py @@ -1,54 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.route_by_container_port import RouteByContainerPort from saturn_api.models.route_by_id import RouteById from saturn_api.models.route_by_subdomain import RouteBySubdomain +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar ROUTEREFERENCE_ONE_OF_SCHEMAS = ["RouteByContainerPort", "RouteById", "RouteBySubdomain", "str"] -T = TypeVar( - "T", - RouteByContainerPort, - RouteById, - RouteBySubdomain, - str, - default=Union[RouteByContainerPort, RouteById, RouteBySubdomain, str], -) - +T = TypeVar("T", RouteByContainerPort, RouteById, RouteBySubdomain, str, default=Union[RouteByContainerPort, RouteById, RouteBySubdomain, str]) class RouteReference(RootModel[T]): """ RouteReference """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -85,3 +68,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/route_state.py b/saturn_api/models/route_state.py new file mode 100644 index 0000000..884d1a9 --- /dev/null +++ b/saturn_api/models/route_state.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Saturn Cloud + + The API for Saturn Cloud. + + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set +from typing_extensions import Self + +class RouteState(BaseModel): + """ + RouteState + """ # noqa: E501 + subdomain: StrictStr + container_port: StrictInt + url: StrictStr + __properties: ClassVar[List[str]] = ["subdomain", "container_port", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RouteState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "subdomain", + "container_port", + "url", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RouteState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "url": obj.get("url") + }) + return _obj + + diff --git a/saturn_api/models/route_update.py b/saturn_api/models/route_update.py index a7a1ae3..e1783f7 100644 --- a/saturn_api/models/route_update.py +++ b/saturn_api/models/route_update.py @@ -1,49 +1,45 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class RouteUpdate(BaseModel): """ RouteUpdate - """ # noqa: E501 - + """ # noqa: E501 subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain of the route.") - container_port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field( - default=None, description="Exposed port in the container." - ) - visibility: Literal["unauthenticated", "account", "org", "owner"] | None = None + container_port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Exposed port in the container.") + visibility: Literal['unauthenticated', 'account', 'org', 'owner'] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator("visibility") + @field_validator('visibility') def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["unauthenticated", "account", "org", "owner"]): - raise ValueError( - "must be one of enum values ('unauthenticated', 'account', 'org', 'owner')" - ) + if value not in set(['unauthenticated', 'account', 'org', 'owner']): + raise ValueError("must be one of enum values ('unauthenticated', 'account', 'org', 'owner')") return value model_config = ConfigDict( @@ -52,6 +48,7 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility"), - } - ) + _obj = cls.model_validate({ + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility") + }) return _obj + + diff --git a/saturn_api/models/secret.py b/saturn_api/models/secret.py index a04caa7..416bb68 100644 --- a/saturn_api/models/secret.py +++ b/saturn_api/models/secret.py @@ -1,43 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner import Owner from saturn_api.models.secret_access_level import SecretAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class Secret(BaseModel): """ Secret - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the secret.") name: StrictStr = Field(description="Name of the secret.") owner: Owner = Field(description="Owner of the secret.") created_at: StrictStr = Field(description="Creation timestamp.") access: SecretAccessLevel - editable: Optional[StrictBool] = Field( - default=None, description="True if the secret is editable by the authenticated user/group." - ) + editable: Optional[StrictBool] = Field(default=None, description="True if the secret is editable by the authenticated user/group.") __properties: ClassVar[List[str]] = ["id", "name", "owner", "created_at", "access", "editable"] model_config = ConfigDict( @@ -46,6 +42,7 @@ class Secret(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,15 +72,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "created_at", - "editable", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "created_at", + "editable", + ]) _dict = self.model_dump( by_alias=True, @@ -92,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -104,14 +99,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "created_at": obj.get("created_at"), - "access": obj.get("access"), - "editable": obj.get("editable"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "created_at": obj.get("created_at"), + "access": obj.get("access"), + "editable": obj.get("editable") + }) return _obj + + diff --git a/saturn_api/models/secret_access_level.py b/saturn_api/models/secret_access_level.py index 4d15bdd..df1a1a1 100644 --- a/saturn_api/models/secret_access_level.py +++ b/saturn_api/models/secret_access_level.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,10 +26,12 @@ class SecretAccessLevel(str, Enum): """ allowed enum values """ - ORG = "org" - OWNER = "owner" + ORG = 'org' + OWNER = 'owner' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SecretAccessLevel from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/secret_attachment.py b/saturn_api/models/secret_attachment.py index 9890654..6af5254 100644 --- a/saturn_api/models/secret_attachment.py +++ b/saturn_api/models/secret_attachment.py @@ -1,51 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.secret import Secret from saturn_api.models.secret_attachment_type import SecretAttachmentType - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretAttachment(BaseModel): """ SecretAttachment - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the secret attachment.") created_at: StrictStr = Field(description="Creation timestamp.") attachment_type: SecretAttachmentType - location: StrictStr = Field( - description="Location of the attachment on the resource. Format depends on attachment type." - ) + location: StrictStr = Field(description="Location of the attachment on the resource. Format depends on attachment type.") description: StrictStr = Field(description="Description of the secret attachment.") secret: Optional[Secret] = Field(description="Secret attached to the resource.") - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "attachment_type", - "location", - "description", - "secret", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "attachment_type", "location", "description", "secret"] model_config = ConfigDict( populate_by_name=True, @@ -53,6 +42,7 @@ class SecretAttachment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,15 +72,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "location", - "description", - "secret", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "location", + "description", + "secret", + ]) _dict = self.model_dump( by_alias=True, @@ -99,11 +87,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() # set to None if secret (nullable) is None # and model_fields_set contains the field if self.secret is None and "secret" in self.model_fields_set: - _dict["secret"] = None + _dict['secret'] = None return _dict @@ -116,16 +104,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "attachment_type": obj.get("attachment_type"), - "location": obj.get("location"), - "description": obj.get("description"), - "secret": ( - Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "attachment_type": obj.get("attachment_type"), + "location": obj.get("location"), + "description": obj.get("description"), + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/saturn_api/models/secret_attachment_create.py b/saturn_api/models/secret_attachment_create.py index b24616d..59b96f5 100644 --- a/saturn_api/models/secret_attachment_create.py +++ b/saturn_api/models/secret_attachment_create.py @@ -1,56 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_create import SecretCreate - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretAttachmentCreate(BaseModel): """ SecretAttachmentCreate - """ # noqa: E501 - + """ # noqa: E501 attachment_type: Optional[SecretAttachmentType] = None - location: Optional[StrictStr] = Field( - default=None, - description="Location of the attachment on the resource. Format depends on attachment type.", - ) - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default="", description="Description of the secret attachment." - ) - secret: Optional[SecretCreate] = Field( - default=None, description="New secret to create and attach to the resource." - ) - secret_id: Optional[StrictStr] = Field( - default=None, description="Secret ID attached to the resource." - ) - __properties: ClassVar[List[str]] = [ - "attachment_type", - "location", - "description", - "secret", - "secret_id", - ] + location: Optional[StrictStr] = Field(default=None, description="Location of the attachment on the resource. Format depends on attachment type.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the secret attachment.") + secret: Optional[SecretCreate] = Field(default=None, description="New secret to create and attach to the resource.") + secret_id: Optional[StrictStr] = Field(default=None, description="Secret ID attached to the resource.") + __properties: ClassVar[List[str]] = ["attachment_type", "location", "description", "secret", "secret_id"] model_config = ConfigDict( populate_by_name=True, @@ -58,6 +42,7 @@ class SecretAttachmentCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -91,16 +77,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() # set to None if secret (nullable) is None # and model_fields_set contains the field if self.secret is None and "secret" in self.model_fields_set: - _dict["secret"] = None + _dict['secret'] = None # set to None if secret_id (nullable) is None # and model_fields_set contains the field if self.secret_id is None and "secret_id" in self.model_fields_set: - _dict["secret_id"] = None + _dict['secret_id'] = None return _dict @@ -113,15 +99,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "attachment_type": obj.get("attachment_type"), - "location": obj.get("location"), - "description": obj.get("description") if obj.get("description") is not None else "", - "secret": ( - SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None - ), - "secret_id": obj.get("secret_id"), - } - ) + _obj = cls.model_validate({ + "attachment_type": obj.get("attachment_type"), + "location": obj.get("location"), + "description": obj.get("description") if obj.get("description") is not None else '', + "secret": SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None, + "secret_id": obj.get("secret_id") + }) return _obj + + diff --git a/saturn_api/models/secret_attachment_list.py b/saturn_api/models/secret_attachment_list.py index 03b2953..0799e2a 100644 --- a/saturn_api/models/secret_attachment_list.py +++ b/saturn_api/models/secret_attachment_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.secret_attachment import SecretAttachment - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretAttachmentList(BaseModel): """ SecretAttachmentList - """ # noqa: E501 - + """ # noqa: E501 secret_attachments: List[SecretAttachment] = Field(description="List of secret attachments.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class SecretAttachmentList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "secret_attachments", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "secret_attachments", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_secret_attachments in self.secret_attachments: if _item_secret_attachments: _items.append(_item_secret_attachments.to_dict()) - _dict["secret_attachments"] = _items + _dict['secret_attachments'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret_attachments": ( - [SecretAttachment.from_dict(_item) for _item in obj["secret_attachments"]] - if obj.get("secret_attachments") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "secret_attachments": [SecretAttachment.from_dict(_item) for _item in obj["secret_attachments"]] if obj.get("secret_attachments") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/secret_attachment_recipe.py b/saturn_api/models/secret_attachment_recipe.py index 467ff35..ba73e88 100644 --- a/saturn_api/models/secret_attachment_recipe.py +++ b/saturn_api/models/secret_attachment_recipe.py @@ -1,47 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_type import SecretAttachmentType - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretAttachmentRecipe(BaseModel): """ SecretAttachmentRecipe - """ # noqa: E501 - + """ # noqa: E501 location: StrictStr attachment_type: SecretAttachmentType - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = "" + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = '' owner: Optional[OwnerReference] = None name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "location", - "attachment_type", - "description", - "owner", - "name", - ] + __properties: ClassVar[List[str]] = ["location", "attachment_type", "description", "owner", "name"] model_config = ConfigDict( populate_by_name=True, @@ -49,6 +42,7 @@ class SecretAttachmentRecipe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -94,15 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "location": obj.get("location"), - "attachment_type": obj.get("attachment_type"), - "description": obj.get("description") if obj.get("description") is not None else "", - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "location": obj.get("location"), + "attachment_type": obj.get("attachment_type"), + "description": obj.get("description") if obj.get("description") is not None else '', + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "name": obj.get("name") + }) return _obj + + diff --git a/saturn_api/models/secret_attachment_type.py b/saturn_api/models/secret_attachment_type.py index 4fdb2b4..0da5f3b 100644 --- a/saturn_api/models/secret_attachment_type.py +++ b/saturn_api/models/secret_attachment_type.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,10 +26,12 @@ class SecretAttachmentType(str, Enum): """ allowed enum values """ - ENVIRONMENT_VARIABLE = "environment_variable" - FILE = "file" + ENVIRONMENT_VARIABLE = 'environment_variable' + FILE = 'file' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SecretAttachmentType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/secret_attachment_update.py b/saturn_api/models/secret_attachment_update.py index 4915c1f..9e9030a 100644 --- a/saturn_api/models/secret_attachment_update.py +++ b/saturn_api/models/secret_attachment_update.py @@ -1,56 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_create import SecretCreate - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretAttachmentUpdate(BaseModel): """ SecretAttachmentUpdate - """ # noqa: E501 - + """ # noqa: E501 attachment_type: Optional[SecretAttachmentType] = None - location: Optional[StrictStr] = Field( - default=None, - description="Location of the attachment on the resource. Format depends on attachment type.", - ) - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default=None, description="Description of the secret attachment." - ) - secret: Optional[SecretCreate] = Field( - default=None, description="New secret to create and attach to the resource." - ) - secret_id: Optional[StrictStr] = Field( - default=None, description="Secret ID attached to the resource." - ) - __properties: ClassVar[List[str]] = [ - "attachment_type", - "location", - "description", - "secret", - "secret_id", - ] + location: Optional[StrictStr] = Field(default=None, description="Location of the attachment on the resource. Format depends on attachment type.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the secret attachment.") + secret: Optional[SecretCreate] = Field(default=None, description="New secret to create and attach to the resource.") + secret_id: Optional[StrictStr] = Field(default=None, description="Secret ID attached to the resource.") + __properties: ClassVar[List[str]] = ["attachment_type", "location", "description", "secret", "secret_id"] model_config = ConfigDict( populate_by_name=True, @@ -58,6 +42,7 @@ class SecretAttachmentUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -91,16 +77,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() # set to None if secret (nullable) is None # and model_fields_set contains the field if self.secret is None and "secret" in self.model_fields_set: - _dict["secret"] = None + _dict['secret'] = None # set to None if secret_id (nullable) is None # and model_fields_set contains the field if self.secret_id is None and "secret_id" in self.model_fields_set: - _dict["secret_id"] = None + _dict['secret_id'] = None return _dict @@ -113,15 +99,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "attachment_type": obj.get("attachment_type"), - "location": obj.get("location"), - "description": obj.get("description"), - "secret": ( - SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None - ), - "secret_id": obj.get("secret_id"), - } - ) + _obj = cls.model_validate({ + "attachment_type": obj.get("attachment_type"), + "location": obj.get("location"), + "description": obj.get("description"), + "secret": SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None, + "secret_id": obj.get("secret_id") + }) return _obj + + diff --git a/saturn_api/models/secret_create.py b/saturn_api/models/secret_create.py index 7dbb23e..9f9b0f5 100644 --- a/saturn_api/models/secret_create.py +++ b/saturn_api/models/secret_create.py @@ -1,35 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_access_level import SecretAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretCreate(BaseModel): """ SecretCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the secret.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the secret.") access: Optional[SecretAccessLevel] = None @@ -42,6 +40,7 @@ class SecretCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -87,14 +87,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "access": obj.get("access"), - "value": obj.get("value"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "access": obj.get("access"), + "value": obj.get("value") + }) return _obj + + diff --git a/saturn_api/models/secret_list.py b/saturn_api/models/secret_list.py index e712779..58a37a9 100644 --- a/saturn_api/models/secret_list.py +++ b/saturn_api/models/secret_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.secret import Secret - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretList(BaseModel): """ SecretList - """ # noqa: E501 - + """ # noqa: E501 secrets: List[Secret] = Field(description="List of secrets.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class SecretList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "secrets", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "secrets", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict["secrets"] = _items + _dict['secrets'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secrets": ( - [Secret.from_dict(_item) for _item in obj["secrets"]] - if obj.get("secrets") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "secrets": [Secret.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/secret_update.py b/saturn_api/models/secret_update.py index 30da3dc..f5d1325 100644 --- a/saturn_api/models/secret_update.py +++ b/saturn_api/models/secret_update.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.secret_access_level import SecretAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class SecretUpdate(BaseModel): """ SecretUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the secret.") access: Optional[SecretAccessLevel] = None value: Optional[StrictStr] = Field(default=None, description="Value of the secret.") @@ -40,6 +38,7 @@ class SecretUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "access": obj.get("access"), "value": obj.get("value")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "access": obj.get("access"), + "value": obj.get("value") + }) return _obj + + diff --git a/saturn_api/models/server_options.py b/saturn_api/models/server_options.py index 1f90eff..c232eda 100644 --- a/saturn_api/models/server_options.py +++ b/saturn_api/models/server_options.py @@ -1,41 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.instance_size import InstanceSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServerOptions(BaseModel): """ ServerOptions - """ # noqa: E501 - - auto_shutoff: List[StrictStr] = Field( - description="List of available auto-shutoff settings for workspaces." - ) + """ # noqa: E501 + auto_shutoff: List[StrictStr] = Field(description="List of available auto-shutoff settings for workspaces.") disk_space: List[StrictStr] = Field(description="List of available disk sizes for workspaces.") - sizes: Dict[str, InstanceSize] = Field( - description="Mapping of instance size names to their configurations." - ) + sizes: Dict[str, InstanceSize] = Field(description="Mapping of instance size names to their configurations.") __properties: ClassVar[List[str]] = ["auto_shutoff", "disk_space", "sizes"] model_config = ConfigDict( @@ -44,6 +38,7 @@ class ServerOptions(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "auto_shutoff", - "disk_space", - "sizes", - ] - ) + excluded_fields: Set[str] = set([ + "auto_shutoff", + "disk_space", + "sizes", + ]) _dict = self.model_dump( by_alias=True, @@ -90,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _key_sizes in self.sizes: if self.sizes[_key_sizes]: _field_dict[_key_sizes] = self.sizes[_key_sizes].to_dict() - _dict["sizes"] = _field_dict + _dict['sizes'] = _field_dict return _dict @classmethod @@ -102,15 +95,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "auto_shutoff": obj.get("auto_shutoff"), - "disk_space": obj.get("disk_space"), - "sizes": ( - dict((_k, InstanceSize.from_dict(_v)) for _k, _v in obj["sizes"].items()) - if obj.get("sizes") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "auto_shutoff": obj.get("auto_shutoff"), + "disk_space": obj.get("disk_space"), + "sizes": dict( + (_k, InstanceSize.from_dict(_v)) + for _k, _v in obj["sizes"].items() + ) + if obj.get("sizes") is not None + else None + }) return _obj + + diff --git a/saturn_api/models/server_options_size.py b/saturn_api/models/server_options_size.py index 3403441..63ccd95 100644 --- a/saturn_api/models/server_options_size.py +++ b/saturn_api/models/server_options_size.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.instance_size import InstanceSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServerOptionsSize(BaseModel): """ ServerOptionsSize - """ # noqa: E501 - + """ # noqa: E501 size: List[InstanceSize] = Field(description="List of available instance sizes.") __properties: ClassVar[List[str]] = ["size"] @@ -38,6 +36,7 @@ class ServerOptionsSize(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,11 +62,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "size", - ] - ) + excluded_fields: Set[str] = set([ + "size", + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_size in self.size: if _item_size: _items.append(_item_size.to_dict()) - _dict["size"] = _items + _dict['size'] = _items return _dict @classmethod @@ -92,13 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "size": ( - [InstanceSize.from_dict(_item) for _item in obj["size"]] - if obj.get("size") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "size": [InstanceSize.from_dict(_item) for _item in obj["size"]] if obj.get("size") is not None else None + }) return _obj + + diff --git a/saturn_api/models/service_account.py b/saturn_api/models/service_account.py index f9802bf..0bd675b 100644 --- a/saturn_api/models/service_account.py +++ b/saturn_api/models/service_account.py @@ -1,41 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ServiceAccount(BaseModel): """ ServiceAccount - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the service account.") created_at: StrictStr = Field(description="Creation timestamp") name: StrictStr = Field(description="Name of the service account.") - cloud_role: Optional[StrictStr] = Field( - description="Cloud role attached to the service account." - ) - auto_associate: StrictBool = Field( - description="Automatically entitle access to the service account for new users and groups." - ) + cloud_role: Optional[StrictStr] = Field(description="Cloud role attached to the service account.") + auto_associate: StrictBool = Field(description="Automatically entitle access to the service account for new users and groups.") __properties: ClassVar[List[str]] = ["id", "created_at", "name", "cloud_role", "auto_associate"] model_config = ConfigDict( @@ -44,6 +39,7 @@ class ServiceAccount(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,15 +69,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "name", - "cloud_role", - "auto_associate", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "name", + "cloud_role", + "auto_associate", + ]) _dict = self.model_dump( by_alias=True, @@ -91,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if cloud_role (nullable) is None # and model_fields_set contains the field if self.cloud_role is None and "cloud_role" in self.model_fields_set: - _dict["cloud_role"] = None + _dict['cloud_role'] = None return _dict @@ -104,13 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "cloud_role": obj.get("cloud_role"), - "auto_associate": obj.get("auto_associate"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "name": obj.get("name"), + "cloud_role": obj.get("cloud_role"), + "auto_associate": obj.get("auto_associate") + }) return _obj + + diff --git a/saturn_api/models/service_account_attachment.py b/saturn_api/models/service_account_attachment.py index f362a12..e9c99cf 100644 --- a/saturn_api/models/service_account_attachment.py +++ b/saturn_api/models/service_account_attachment.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.service_account import ServiceAccount - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServiceAccountAttachment(BaseModel): """ ServiceAccountAttachment - """ # noqa: E501 - - service_account: ServiceAccount = Field( - description="Service account that is attached to the resource." - ) + """ # noqa: E501 + service_account: ServiceAccount = Field(description="Service account that is attached to the resource.") __properties: ClassVar[List[str]] = ["service_account"] model_config = ConfigDict( @@ -40,6 +36,7 @@ class ServiceAccountAttachment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,11 +62,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "service_account", - ] - ) + excluded_fields: Set[str] = set([ + "service_account", + ]) _dict = self.model_dump( by_alias=True, @@ -78,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_account if self.service_account: - _dict["service_account"] = self.service_account.to_dict() + _dict['service_account'] = self.service_account.to_dict() return _dict @classmethod @@ -90,13 +85,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_account": ( - ServiceAccount.from_dict(obj["service_account"]) - if obj.get("service_account") is not None - else None - ) - } - ) + _obj = cls.model_validate({ + "service_account": ServiceAccount.from_dict(obj["service_account"]) if obj.get("service_account") is not None else None + }) return _obj + + diff --git a/saturn_api/models/service_account_create.py b/saturn_api/models/service_account_create.py index 48164dc..83d1172 100644 --- a/saturn_api/models/service_account_create.py +++ b/saturn_api/models/service_account_create.py @@ -1,42 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class ServiceAccountCreate(BaseModel): """ ServiceAccountCreate - """ # noqa: E501 - - name: Annotated[str, Field(min_length=1, strict=True, max_length=253)] = Field( - description="Name of the service account." - ) - cloud_role: Optional[StrictStr] = Field( - default=None, description="Cloud role attached to the service account." - ) - auto_associate: Optional[StrictBool] = Field( - default=False, - description="Automatically grant access to the service account for new users and groups.", - ) + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=253)] = Field(description="Name of the service account.") + cloud_role: Optional[StrictStr] = Field(default=None, description="Cloud role attached to the service account.") + auto_associate: Optional[StrictBool] = Field(default=False, description="Automatically grant access to the service account for new users and groups.") __properties: ClassVar[List[str]] = ["name", "cloud_role", "auto_associate"] model_config = ConfigDict( @@ -45,6 +38,7 @@ class ServiceAccountCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if cloud_role (nullable) is None # and model_fields_set contains the field if self.cloud_role is None and "cloud_role" in self.model_fields_set: - _dict["cloud_role"] = None + _dict['cloud_role'] = None return _dict @@ -92,13 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "cloud_role": obj.get("cloud_role"), - "auto_associate": ( - obj.get("auto_associate") if obj.get("auto_associate") is not None else False - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "cloud_role": obj.get("cloud_role"), + "auto_associate": obj.get("auto_associate") if obj.get("auto_associate") is not None else False + }) return _obj + + diff --git a/saturn_api/models/service_account_create_attachment.py b/saturn_api/models/service_account_create_attachment.py index 387e669..d43cf9d 100644 --- a/saturn_api/models/service_account_create_attachment.py +++ b/saturn_api/models/service_account_create_attachment.py @@ -1,35 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class ServiceAccountCreateAttachment(BaseModel): """ ServiceAccountCreateAttachment - """ # noqa: E501 - - service_account_id: StrictStr = Field( - description="Service account ID to attach to the resource." - ) + """ # noqa: E501 + service_account_id: StrictStr = Field(description="Service account ID to attach to the resource.") __properties: ClassVar[List[str]] = ["service_account_id"] model_config = ConfigDict( @@ -38,6 +35,7 @@ class ServiceAccountCreateAttachment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"service_account_id": obj.get("service_account_id")}) + _obj = cls.model_validate({ + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/saturn_api/models/service_account_entitlement.py b/saturn_api/models/service_account_entitlement.py index 5a0462f..b667cc1 100644 --- a/saturn_api/models/service_account_entitlement.py +++ b/saturn_api/models/service_account_entitlement.py @@ -1,46 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.service_account import ServiceAccount - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServiceAccountEntitlement(BaseModel): """ ServiceAccountEntitlement - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the service account entitlement.") created_at: StrictStr = Field(description="Creation timestamp.") service_account: ServiceAccount = Field(description="Entitled service account.") user_id: Optional[StrictStr] = Field(description="User ID that is entitled.") group_id: Optional[StrictStr] = Field(description="Group ID that is entitled.") - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "service_account", - "user_id", - "group_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "service_account", "user_id", "group_id"] model_config = ConfigDict( populate_by_name=True, @@ -48,6 +40,7 @@ class ServiceAccountEntitlement(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,15 +70,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "service_account", - "user_id", - "group_id", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "service_account", + "user_id", + "group_id", + ]) _dict = self.model_dump( by_alias=True, @@ -94,16 +85,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_account if self.service_account: - _dict["service_account"] = self.service_account.to_dict() + _dict['service_account'] = self.service_account.to_dict() # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict["user_id"] = None + _dict['user_id'] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict["group_id"] = None + _dict['group_id'] = None return _dict @@ -116,17 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "service_account": ( - ServiceAccount.from_dict(obj["service_account"]) - if obj.get("service_account") is not None - else None - ), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "service_account": ServiceAccount.from_dict(obj["service_account"]) if obj.get("service_account") is not None else None, + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id") + }) return _obj + + diff --git a/saturn_api/models/service_account_entitlement_create.py b/saturn_api/models/service_account_entitlement_create.py index 5161ce1..ea049f0 100644 --- a/saturn_api/models/service_account_entitlement_create.py +++ b/saturn_api/models/service_account_entitlement_create.py @@ -1,40 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity_reference import IdentityReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServiceAccountEntitlementCreate(BaseModel): """ ServiceAccountEntitlementCreate - """ # noqa: E501 - - service_account_id: StrictStr = Field( - description="ID of the service account to entitle the identity to." - ) - identity: Optional[IdentityReference] = Field( - default=None, description="Reference to an identity." - ) + """ # noqa: E501 + service_account_id: StrictStr = Field(description="ID of the service account to entitle the identity to.") + identity: Optional[IdentityReference] = Field(default=None, description="Reference to an identity.") __properties: ClassVar[List[str]] = ["service_account_id", "identity"] model_config = ConfigDict( @@ -43,6 +37,7 @@ class ServiceAccountEntitlementCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() return _dict @classmethod @@ -88,14 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_account_id": obj.get("service_account_id"), - "identity": ( - IdentityReference.from_dict(obj["identity"]) - if obj.get("identity") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "service_account_id": obj.get("service_account_id"), + "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None + }) return _obj + + diff --git a/saturn_api/models/service_account_entitlement_list.py b/saturn_api/models/service_account_entitlement_list.py index ae70dec..6300878 100644 --- a/saturn_api/models/service_account_entitlement_list.py +++ b/saturn_api/models/service_account_entitlement_list.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServiceAccountEntitlementList(BaseModel): """ ServiceAccountEntitlementList - """ # noqa: E501 - - service_account_entitlements: List[ServiceAccountEntitlement] = Field( - description="List of service account entitlements." - ) + """ # noqa: E501 + service_account_entitlements: List[ServiceAccountEntitlement] = Field(description="List of service account entitlements.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["service_account_entitlements", "prev_key", "next_key"] @@ -42,6 +38,7 @@ class ServiceAccountEntitlementList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "service_account_entitlements", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "service_account_entitlements", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -88,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_service_account_entitlements in self.service_account_entitlements: if _item_service_account_entitlements: _items.append(_item_service_account_entitlements.to_dict()) - _dict["service_account_entitlements"] = _items + _dict['service_account_entitlements'] = _items return _dict @classmethod @@ -100,18 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_account_entitlements": ( - [ - ServiceAccountEntitlement.from_dict(_item) - for _item in obj["service_account_entitlements"] - ] - if obj.get("service_account_entitlements") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "service_account_entitlements": [ServiceAccountEntitlement.from_dict(_item) for _item in obj["service_account_entitlements"]] if obj.get("service_account_entitlements") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/service_account_list.py b/saturn_api/models/service_account_list.py index fd589e8..cd37867 100644 --- a/saturn_api/models/service_account_list.py +++ b/saturn_api/models/service_account_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.service_account import ServiceAccount - +from typing import Literal, Optional, Set +from typing_extensions import Self class ServiceAccountList(BaseModel): """ ServiceAccountList - """ # noqa: E501 - + """ # noqa: E501 service_accounts: List[ServiceAccount] = Field(description="List of service accounts.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ServiceAccountList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "service_accounts", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "service_accounts", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_service_accounts in self.service_accounts: if _item_service_accounts: _items.append(_item_service_accounts.to_dict()) - _dict["service_accounts"] = _items + _dict['service_accounts'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_accounts": ( - [ServiceAccount.from_dict(_item) for _item in obj["service_accounts"]] - if obj.get("service_accounts") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "service_accounts": [ServiceAccount.from_dict(_item) for _item in obj["service_accounts"]] if obj.get("service_accounts") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/service_account_update.py b/saturn_api/models/service_account_update.py index 17b5d4b..2930d43 100644 --- a/saturn_api/models/service_account_update.py +++ b/saturn_api/models/service_account_update.py @@ -1,39 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class ServiceAccountUpdate(BaseModel): """ ServiceAccountUpdate - """ # noqa: E501 - - cloud_role: Optional[StrictStr] = Field( - default=None, description="Cloud role attached to the service account." - ) - auto_associate: Optional[StrictBool] = Field( - default=None, - description="Automatically grant access to the service account for new users and groups.", - ) + """ # noqa: E501 + cloud_role: Optional[StrictStr] = Field(default=None, description="Cloud role attached to the service account.") + auto_associate: Optional[StrictBool] = Field(default=None, description="Automatically grant access to the service account for new users and groups.") __properties: ClassVar[List[str]] = ["cloud_role", "auto_associate"] model_config = ConfigDict( @@ -42,6 +36,7 @@ class ServiceAccountUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if cloud_role (nullable) is None # and model_fields_set contains the field if self.cloud_role is None and "cloud_role" in self.model_fields_set: - _dict["cloud_role"] = None + _dict['cloud_role'] = None return _dict @@ -89,7 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"cloud_role": obj.get("cloud_role"), "auto_associate": obj.get("auto_associate")} - ) + _obj = cls.model_validate({ + "cloud_role": obj.get("cloud_role"), + "auto_associate": obj.get("auto_associate") + }) return _obj + + diff --git a/saturn_api/models/shared_access_mode.py b/saturn_api/models/shared_access_mode.py index fbc01f6..e81bfff 100644 --- a/saturn_api/models/shared_access_mode.py +++ b/saturn_api/models/shared_access_mode.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,10 +26,12 @@ class SharedAccessMode(str, Enum): """ allowed enum values """ - READONLYMANY = "ReadOnlyMany" - READWRITEMANY = "ReadWriteMany" + READONLYMANY = 'ReadOnlyMany' + READWRITEMANY = 'ReadWriteMany' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SharedAccessMode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/shared_folder.py b/saturn_api/models/shared_folder.py index b9e3cc9..0e8d789 100644 --- a/saturn_api/models/shared_folder.py +++ b/saturn_api/models/shared_folder.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.owner import Owner from saturn_api.models.shared_access_mode import SharedAccessMode from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolder(BaseModel): """ SharedFolder - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the shared folder.") name: StrictStr = Field(description="Name of the shared folder.") owner: Owner = Field(description="Owner of the shared folder.") @@ -38,19 +36,8 @@ class SharedFolder(BaseModel): access: SharedFolderAccessLevel access_mode: SharedAccessMode is_external: StrictBool = Field(description="True if the shared folder is externally managed.") - editable: StrictBool = Field( - description="True if the shard folder is editable by the authenticated user/group." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "created_at", - "access", - "access_mode", - "is_external", - "editable", - ] + editable: StrictBool = Field(description="True if the shard folder is editable by the authenticated user/group.") + __properties: ClassVar[List[str]] = ["id", "name", "owner", "created_at", "access", "access_mode", "is_external", "editable"] model_config = ConfigDict( populate_by_name=True, @@ -58,6 +45,7 @@ class SharedFolder(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -88,16 +76,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "created_at", - "is_external", - "editable", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "created_at", + "is_external", + "editable", + ]) _dict = self.model_dump( by_alias=True, @@ -106,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -118,16 +104,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "created_at": obj.get("created_at"), - "access": obj.get("access"), - "access_mode": obj.get("access_mode"), - "is_external": obj.get("is_external"), - "editable": obj.get("editable"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "created_at": obj.get("created_at"), + "access": obj.get("access"), + "access_mode": obj.get("access_mode"), + "is_external": obj.get("is_external"), + "editable": obj.get("editable") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_access_level.py b/saturn_api/models/shared_folder_access_level.py index cd69f99..1292b95 100644 --- a/saturn_api/models/shared_folder_access_level.py +++ b/saturn_api/models/shared_folder_access_level.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,10 +26,12 @@ class SharedFolderAccessLevel(str, Enum): """ allowed enum values """ - ORG = "org" - OWNER = "owner" + ORG = 'org' + OWNER = 'owner' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SharedFolderAccessLevel from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/shared_folder_attachment.py b/saturn_api/models/shared_folder_attachment.py index c2fe8fa..b47dacf 100644 --- a/saturn_api/models/shared_folder_attachment.py +++ b/saturn_api/models/shared_folder_attachment.py @@ -1,48 +1,38 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.shared_folder import SharedFolder - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderAttachment(BaseModel): """ SharedFolderAttachment - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the shared folder attachment") - shared_folder: SharedFolder = Field( - description="Shared folder that is attached to the resource." - ) + shared_folder: SharedFolder = Field(description="Shared folder that is attached to the resource.") workspace_id: StrictStr = Field(description="Workspace ID of the shared folder attachment.") deployment_id: StrictStr = Field(description="Deployment ID of the shared folder attachment.") path: StrictStr = Field(description="Mount path of the shared folder in the resource.") - __properties: ClassVar[List[str]] = [ - "id", - "shared_folder", - "workspace_id", - "deployment_id", - "path", - ] + __properties: ClassVar[List[str]] = ["id", "shared_folder", "workspace_id", "deployment_id", "path"] model_config = ConfigDict( populate_by_name=True, @@ -50,6 +40,7 @@ class SharedFolderAttachment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,15 +70,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "shared_folder", - "workspace_id", - "deployment_id", - "path", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "shared_folder", + "workspace_id", + "deployment_id", + "path", + ]) _dict = self.model_dump( by_alias=True, @@ -96,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of shared_folder if self.shared_folder: - _dict["shared_folder"] = self.shared_folder.to_dict() + _dict['shared_folder'] = self.shared_folder.to_dict() return _dict @classmethod @@ -108,17 +97,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "shared_folder": ( - SharedFolder.from_dict(obj["shared_folder"]) - if obj.get("shared_folder") is not None - else None - ), - "workspace_id": obj.get("workspace_id"), - "deployment_id": obj.get("deployment_id"), - "path": obj.get("path"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "shared_folder": SharedFolder.from_dict(obj["shared_folder"]) if obj.get("shared_folder") is not None else None, + "workspace_id": obj.get("workspace_id"), + "deployment_id": obj.get("deployment_id"), + "path": obj.get("path") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_attachment_create.py b/saturn_api/models/shared_folder_attachment_create.py index 6520982..0690a02 100644 --- a/saturn_api/models/shared_folder_attachment_create.py +++ b/saturn_api/models/shared_folder_attachment_create.py @@ -1,39 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.resource_reference import ResourceReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderAttachmentCreate(BaseModel): """ SharedFolderAttachmentCreate - """ # noqa: E501 - + """ # noqa: E501 shared_folder_id: StrictStr = Field(description="Shared folder ID to attach to the resource.") resource: ResourceReference = Field(description="Reference to a resource.") - path: Optional[StrictStr] = Field( - default=None, description="Mount path of the shared folder in the resource." - ) + path: Optional[StrictStr] = Field(default=None, description="Mount path of the shared folder in the resource.") __properties: ClassVar[List[str]] = ["shared_folder_id", "resource", "path"] model_config = ConfigDict( @@ -42,6 +38,7 @@ class SharedFolderAttachmentCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of resource if self.resource: - _dict["resource"] = self.resource.to_dict() + _dict['resource'] = self.resource.to_dict() return _dict @classmethod @@ -87,15 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "shared_folder_id": obj.get("shared_folder_id"), - "resource": ( - ResourceReference.from_dict(obj["resource"]) - if obj.get("resource") is not None - else None - ), - "path": obj.get("path"), - } - ) + _obj = cls.model_validate({ + "shared_folder_id": obj.get("shared_folder_id"), + "resource": ResourceReference.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "path": obj.get("path") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_attachment_list.py b/saturn_api/models/shared_folder_attachment_list.py index c4a85cd..7cadff1 100644 --- a/saturn_api/models/shared_folder_attachment_list.py +++ b/saturn_api/models/shared_folder_attachment_list.py @@ -1,37 +1,33 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.shared_folder_attachment import SharedFolderAttachment - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderAttachmentList(BaseModel): """ SharedFolderAttachmentList - """ # noqa: E501 - - shared_folder_attachments: List[SharedFolderAttachment] = Field( - description="List of shared folder attachments." - ) + """ # noqa: E501 + shared_folder_attachments: List[SharedFolderAttachment] = Field(description="List of shared folder attachments.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["shared_folder_attachments", "prev_key", "next_key"] @@ -42,6 +38,7 @@ class SharedFolderAttachmentList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "shared_folder_attachments", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "shared_folder_attachments", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -88,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_shared_folder_attachments in self.shared_folder_attachments: if _item_shared_folder_attachments: _items.append(_item_shared_folder_attachments.to_dict()) - _dict["shared_folder_attachments"] = _items + _dict['shared_folder_attachments'] = _items return _dict @classmethod @@ -100,18 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "shared_folder_attachments": ( - [ - SharedFolderAttachment.from_dict(_item) - for _item in obj["shared_folder_attachments"] - ] - if obj.get("shared_folder_attachments") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "shared_folder_attachments": [SharedFolderAttachment.from_dict(_item) for _item in obj["shared_folder_attachments"]] if obj.get("shared_folder_attachments") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_attachment_recipe.py b/saturn_api/models/shared_folder_attachment_recipe.py index a5f1767..c4212e7 100644 --- a/saturn_api/models/shared_folder_attachment_recipe.py +++ b/saturn_api/models/shared_folder_attachment_recipe.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderAttachmentRecipe(BaseModel): """ SharedFolderAttachmentRecipe - """ # noqa: E501 - + """ # noqa: E501 owner: Optional[OwnerReference] = None name: StrictStr path: Optional[StrictStr] = None @@ -40,6 +38,7 @@ class SharedFolderAttachmentRecipe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -85,13 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "name": obj.get("name"), - "path": obj.get("path"), - } - ) + _obj = cls.model_validate({ + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "name": obj.get("name"), + "path": obj.get("path") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_attachment_update.py b/saturn_api/models/shared_folder_attachment_update.py index 47cecb2..7a8f47b 100644 --- a/saturn_api/models/shared_folder_attachment_update.py +++ b/saturn_api/models/shared_folder_attachment_update.py @@ -1,35 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class SharedFolderAttachmentUpdate(BaseModel): """ SharedFolderAttachmentUpdate - """ # noqa: E501 - - path: Optional[StrictStr] = Field( - default=None, description="Mount path of the shared folder in the resource." - ) + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="Mount path of the shared folder in the resource.") __properties: ClassVar[List[str]] = ["path"] model_config = ConfigDict( @@ -38,6 +35,7 @@ class SharedFolderAttachmentUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"path": obj.get("path")}) + _obj = cls.model_validate({ + "path": obj.get("path") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_create.py b/saturn_api/models/shared_folder_create.py index 3a7627c..0ad4560 100644 --- a/saturn_api/models/shared_folder_create.py +++ b/saturn_api/models/shared_folder_create.py @@ -1,43 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.shared_access_mode import SharedAccessMode from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderCreate(BaseModel): """ SharedFolderCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the shared folder.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the shared folder.") access: Optional[SharedFolderAccessLevel] = None access_mode: Optional[SharedAccessMode] = None - is_external: Optional[StrictBool] = Field( - default=False, description="True if the shared folder is externally managed." - ) + is_external: Optional[StrictBool] = Field(default=False, description="True if the shared folder is externally managed.") __properties: ClassVar[List[str]] = ["name", "owner", "access", "access_mode", "is_external"] model_config = ConfigDict( @@ -46,6 +42,7 @@ class SharedFolderCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() return _dict @classmethod @@ -91,17 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "access": obj.get("access"), - "access_mode": obj.get("access_mode"), - "is_external": ( - obj.get("is_external") if obj.get("is_external") is not None else False - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "access": obj.get("access"), + "access_mode": obj.get("access_mode"), + "is_external": obj.get("is_external") if obj.get("is_external") is not None else False + }) return _obj + + diff --git a/saturn_api/models/shared_folder_list.py b/saturn_api/models/shared_folder_list.py index 063f5e1..4029a45 100644 --- a/saturn_api/models/shared_folder_list.py +++ b/saturn_api/models/shared_folder_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.shared_folder import SharedFolder - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderList(BaseModel): """ SharedFolderList - """ # noqa: E501 - + """ # noqa: E501 shared_folders: List[SharedFolder] = Field(description="List of shared folders.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class SharedFolderList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "shared_folders", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "shared_folders", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict["shared_folders"] = _items + _dict['shared_folders'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "shared_folders": ( - [SharedFolder.from_dict(_item) for _item in obj["shared_folders"]] - if obj.get("shared_folders") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "shared_folders": [SharedFolder.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/shared_folder_update.py b/saturn_api/models/shared_folder_update.py index bf0ae8d..241401c 100644 --- a/saturn_api/models/shared_folder_update.py +++ b/saturn_api/models/shared_folder_update.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel - +from typing import Literal, Optional, Set +from typing_extensions import Self class SharedFolderUpdate(BaseModel): """ SharedFolderUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the shared folder.") access: Optional[SharedFolderAccessLevel] = None __properties: ClassVar[List[str]] = ["name", "access"] @@ -39,6 +37,7 @@ class SharedFolderUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name"), "access": obj.get("access")}) + _obj = cls.model_validate({ + "name": obj.get("name"), + "access": obj.get("access") + }) return _obj + + diff --git a/saturn_api/models/ssh_private_key.py b/saturn_api/models/ssh_private_key.py index 151b831..f524bc2 100644 --- a/saturn_api/models/ssh_private_key.py +++ b/saturn_api/models/ssh_private_key.py @@ -1,54 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity import Identity - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPrivateKey(BaseModel): """ SSHPrivateKey - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the SSH private key.") name: StrictStr = Field(description="Name of the SSH private key.") identity: Identity = Field(description="Identity that owns the SSH private key.") created_at: StrictStr = Field(description="Creation timestamp.") - public_key: Optional[StrictStr] = Field( - description="SSH public key associated with the private key." - ) + public_key: Optional[StrictStr] = Field(description="SSH public key associated with the private key.") location: StrictStr = Field(description="Path to the SSH private key in resources.") - is_default: StrictBool = Field( - description="Enable SSH private key to be used for any external repositories that do not specify a key." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "identity", - "created_at", - "public_key", - "location", - "is_default", - ] + is_default: StrictBool = Field(description="Enable SSH private key to be used for any external repositories that do not specify a key.") + __properties: ClassVar[List[str]] = ["id", "name", "identity", "created_at", "public_key", "location", "is_default"] model_config = ConfigDict( populate_by_name=True, @@ -56,6 +42,7 @@ class SSHPrivateKey(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,17 +74,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "identity", - "created_at", - "public_key", - "location", - "is_default", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "identity", + "created_at", + "public_key", + "location", + "is_default", + ]) _dict = self.model_dump( by_alias=True, @@ -106,11 +91,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() # set to None if public_key (nullable) is None # and model_fields_set contains the field if self.public_key is None and "public_key" in self.model_fields_set: - _dict["public_key"] = None + _dict['public_key'] = None return _dict @@ -123,17 +108,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "identity": ( - Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None - ), - "created_at": obj.get("created_at"), - "public_key": obj.get("public_key"), - "location": obj.get("location"), - "is_default": obj.get("is_default"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "created_at": obj.get("created_at"), + "public_key": obj.get("public_key"), + "location": obj.get("location"), + "is_default": obj.get("is_default") + }) return _obj + + diff --git a/saturn_api/models/ssh_private_key_create.py b/saturn_api/models/ssh_private_key_create.py index 4362dec..7cfdb9f 100644 --- a/saturn_api/models/ssh_private_key_create.py +++ b/saturn_api/models/ssh_private_key_create.py @@ -1,46 +1,37 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity_reference import IdentityReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPrivateKeyCreate(BaseModel): """ SSHPrivateKeyCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the SSH private key.") - identity: Optional[IdentityReference] = Field( - default=None, description="Reference to the identity that owns the SSH private key." - ) + identity: Optional[IdentityReference] = Field(default=None, description="Reference to the identity that owns the SSH private key.") value: Optional[StrictStr] = Field(default=None, description="Value of the SSH private key.") - location: Optional[StrictStr] = Field( - default=None, description="Path to the SSH private key in resources." - ) - is_default: Optional[StrictBool] = Field( - default=False, - description="Enable SSH private key to be used for any external repositories that do not specify a key.", - ) + location: Optional[StrictStr] = Field(default=None, description="Path to the SSH private key in resources.") + is_default: Optional[StrictBool] = Field(default=False, description="Enable SSH private key to be used for any external repositories that do not specify a key.") __properties: ClassVar[List[str]] = ["name", "identity", "value", "location", "is_default"] model_config = ConfigDict( @@ -49,6 +40,7 @@ class SSHPrivateKeyCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() return _dict @classmethod @@ -94,17 +87,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "identity": ( - IdentityReference.from_dict(obj["identity"]) - if obj.get("identity") is not None - else None - ), - "value": obj.get("value"), - "location": obj.get("location"), - "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "value": obj.get("value"), + "location": obj.get("location"), + "is_default": obj.get("is_default") if obj.get("is_default") is not None else False + }) return _obj + + diff --git a/saturn_api/models/ssh_private_key_list.py b/saturn_api/models/ssh_private_key_list.py index fb00cdd..4f68799 100644 --- a/saturn_api/models/ssh_private_key_list.py +++ b/saturn_api/models/ssh_private_key_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.ssh_private_key import SSHPrivateKey - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPrivateKeyList(BaseModel): """ SSHPrivateKeyList - """ # noqa: E501 - + """ # noqa: E501 ssh_private_keys: List[SSHPrivateKey] = Field(description="List of SSH private keys.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class SSHPrivateKeyList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "ssh_private_keys", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "ssh_private_keys", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_ssh_private_keys in self.ssh_private_keys: if _item_ssh_private_keys: _items.append(_item_ssh_private_keys.to_dict()) - _dict["ssh_private_keys"] = _items + _dict['ssh_private_keys'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "ssh_private_keys": ( - [SSHPrivateKey.from_dict(_item) for _item in obj["ssh_private_keys"]] - if obj.get("ssh_private_keys") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "ssh_private_keys": [SSHPrivateKey.from_dict(_item) for _item in obj["ssh_private_keys"]] if obj.get("ssh_private_keys") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/ssh_private_key_partial.py b/saturn_api/models/ssh_private_key_partial.py index b7bdbcf..9c92614 100644 --- a/saturn_api/models/ssh_private_key_partial.py +++ b/saturn_api/models/ssh_private_key_partial.py @@ -1,50 +1,39 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.identity import Identity - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPrivateKeyPartial(BaseModel): """ SSHPrivateKeyPartial - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the SSH private key.") name: StrictStr = Field(description="Name of the SSH private key.") identity: Identity = Field(description="Identity that owns the SSH private key.") created_at: StrictStr = Field(description="Creation timestamp.") location: StrictStr = Field(description="Path to the SSH private key in resources.") - is_default: StrictBool = Field( - description="Enable SSH private key to be used for any external repositories that do not specify a key." - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "identity", - "created_at", - "location", - "is_default", - ] + is_default: StrictBool = Field(description="Enable SSH private key to be used for any external repositories that do not specify a key.") + __properties: ClassVar[List[str]] = ["id", "name", "identity", "created_at", "location", "is_default"] model_config = ConfigDict( populate_by_name=True, @@ -52,6 +41,7 @@ class SSHPrivateKeyPartial(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,16 +72,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "identity", - "created_at", - "location", - "is_default", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "identity", + "created_at", + "location", + "is_default", + ]) _dict = self.model_dump( by_alias=True, @@ -100,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() return _dict @classmethod @@ -112,16 +100,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "identity": ( - Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None - ), - "created_at": obj.get("created_at"), - "location": obj.get("location"), - "is_default": obj.get("is_default"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "created_at": obj.get("created_at"), + "location": obj.get("location"), + "is_default": obj.get("is_default") + }) return _obj + + diff --git a/saturn_api/models/ssh_private_key_update.py b/saturn_api/models/ssh_private_key_update.py index cfd59f1..3a852a2 100644 --- a/saturn_api/models/ssh_private_key_update.py +++ b/saturn_api/models/ssh_private_key_update.py @@ -1,41 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class SSHPrivateKeyUpdate(BaseModel): """ SSHPrivateKeyUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the SSH private key.") value: Optional[StrictStr] = Field(default=None, description="Value of the SSH private key.") - location: Optional[StrictStr] = Field( - default=None, description="Path to the SSH private key in resources." - ) - is_default: Optional[StrictBool] = Field( - default=None, - description="Enable SSH private key to be used for any external repositories that do not specify a key.", - ) + location: Optional[StrictStr] = Field(default=None, description="Path to the SSH private key in resources.") + is_default: Optional[StrictBool] = Field(default=None, description="Enable SSH private key to be used for any external repositories that do not specify a key.") __properties: ClassVar[List[str]] = ["name", "value", "location", "is_default"] model_config = ConfigDict( @@ -44,6 +38,7 @@ class SSHPrivateKeyUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if value (nullable) is None # and model_fields_set contains the field if self.value is None and "value" in self.model_fields_set: - _dict["value"] = None + _dict['value'] = None return _dict @@ -91,12 +87,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "value": obj.get("value"), - "location": obj.get("location"), - "is_default": obj.get("is_default"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value"), + "location": obj.get("location"), + "is_default": obj.get("is_default") + }) return _obj + + diff --git a/saturn_api/models/ssh_public_key.py b/saturn_api/models/ssh_public_key.py index 9cd17d4..d4d984e 100644 --- a/saturn_api/models/ssh_public_key.py +++ b/saturn_api/models/ssh_public_key.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.identity import Identity - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPublicKey(BaseModel): """ SSHPublicKey - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the SSH public key.") name: StrictStr = Field(description="Name of the SSH public key.") identity: Identity = Field(description="Identity that owns the SSH public key.") @@ -41,6 +39,7 @@ class SSHPublicKey(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,14 +68,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "identity", - "created_at", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "identity", + "created_at", + ]) _dict = self.model_dump( by_alias=True, @@ -85,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() return _dict @classmethod @@ -97,14 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "identity": ( - Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None - ), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/saturn_api/models/ssh_public_key_create.py b/saturn_api/models/ssh_public_key_create.py index 85ac0e6..73c441e 100644 --- a/saturn_api/models/ssh_public_key_create.py +++ b/saturn_api/models/ssh_public_key_create.py @@ -1,38 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity_reference import IdentityReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPublicKeyCreate(BaseModel): """ SSHPublicKeyCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the SSH public key.") - identity: Optional[IdentityReference] = Field( - default=None, description="Refence to the identity that owns the SSH public key." - ) + identity: Optional[IdentityReference] = Field(default=None, description="Refence to the identity that owns the SSH public key.") value: StrictStr = Field(description="Value of the SSH public key.") __properties: ClassVar[List[str]] = ["name", "identity", "value"] @@ -42,6 +38,7 @@ class SSHPublicKeyCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() return _dict @classmethod @@ -87,15 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "identity": ( - IdentityReference.from_dict(obj["identity"]) - if obj.get("identity") is not None - else None - ), - "value": obj.get("value"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "value": obj.get("value") + }) return _obj + + diff --git a/saturn_api/models/ssh_public_key_list.py b/saturn_api/models/ssh_public_key_list.py index b42fd19..026f0e2 100644 --- a/saturn_api/models/ssh_public_key_list.py +++ b/saturn_api/models/ssh_public_key_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.ssh_public_key import SSHPublicKey - +from typing import Literal, Optional, Set +from typing_extensions import Self class SSHPublicKeyList(BaseModel): """ SSHPublicKeyList - """ # noqa: E501 - + """ # noqa: E501 ssh_public_keys: List[SSHPublicKey] = Field(description="List of SSH public keys.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class SSHPublicKeyList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "ssh_public_keys", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "ssh_public_keys", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_ssh_public_keys in self.ssh_public_keys: if _item_ssh_public_keys: _items.append(_item_ssh_public_keys.to_dict()) - _dict["ssh_public_keys"] = _items + _dict['ssh_public_keys'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "ssh_public_keys": ( - [SSHPublicKey.from_dict(_item) for _item in obj["ssh_public_keys"]] - if obj.get("ssh_public_keys") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "ssh_public_keys": [SSHPublicKey.from_dict(_item) for _item in obj["ssh_public_keys"]] if obj.get("ssh_public_keys") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/ssh_public_key_update.py b/saturn_api/models/ssh_public_key_update.py index 7b63ae5..ceeabc7 100644 --- a/saturn_api/models/ssh_public_key_update.py +++ b/saturn_api/models/ssh_public_key_update.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class SSHPublicKeyUpdate(BaseModel): """ SSHPublicKeyUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the SSH public key.") value: Optional[StrictStr] = Field(default=None, description="Value of the SSH public key.") __properties: ClassVar[List[str]] = ["name", "value"] @@ -37,6 +36,7 @@ class SSHPublicKeyUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,5 +80,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name"), "value": obj.get("value")}) + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) return _obj + + diff --git a/saturn_api/models/stats.py b/saturn_api/models/stats.py index 6c5e120..69d1b99 100644 --- a/saturn_api/models/stats.py +++ b/saturn_api/models/stats.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set, Union +import json from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Literal, Optional, Set from typing_extensions import Self - class Stats(BaseModel): """ Stats - """ # noqa: E501 - + """ # noqa: E501 avg: Union[StrictFloat, StrictInt] = Field(description="Average value over the query range.") min: Union[StrictFloat, StrictInt] = Field(description="Minimum value over the query range.") max: Union[StrictFloat, StrictInt] = Field(description="Maximum value over the query range.") @@ -39,6 +38,7 @@ class Stats(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,14 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "avg", - "min", - "max", - "last", - ] - ) + excluded_fields: Set[str] = set([ + "avg", + "min", + "max", + "last", + ]) _dict = self.model_dump( by_alias=True, @@ -92,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "avg": obj.get("avg"), - "min": obj.get("min"), - "max": obj.get("max"), - "last": obj.get("last"), - } - ) + _obj = cls.model_validate({ + "avg": obj.get("avg"), + "min": obj.get("min"), + "max": obj.get("max"), + "last": obj.get("last") + }) return _obj + + diff --git a/saturn_api/models/usage_limits.py b/saturn_api/models/usage_limits.py index a7b3c22..ca40262 100644 --- a/saturn_api/models/usage_limits.py +++ b/saturn_api/models/usage_limits.py @@ -1,85 +1,49 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class UsageLimits(BaseModel): """ UsageLimits - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the usage limit.") org_id: StrictStr = Field(description="Org ID that the usage limit belongs to.") created_at: datetime = Field(description="Creation timestamp.") name: StrictStr = Field(description="Name of the usage limit.") is_default: StrictBool = Field(description="Default usage limit for the org.") - instance_sizes: Optional[List[StrictStr]] = Field( - description="Allowed instance sizes. Null if no limits." - ) - resource_types: Optional[List[StrictStr]] = Field( - description="Allowed resource types. Null if no limits." - ) - num_instances: Optional[StrictInt] = Field( - description="Maximum number of active instances. Null if no limits." - ) - auto_shutoff: Optional[StrictInt] = Field( - description="Maximum allowed auto-shutoff. Null if no limits." - ) - storage_in_gb: Optional[StrictInt] = Field( - description="Total allowed storage in GiB. Null if no limits." - ) - num_shared_folders: Optional[StrictInt] = Field( - description="Maximum number of shared folders. Null if no limits." - ) - object_storage_bytes: Optional[StrictInt] = Field( - description="Maximum allowed object storage bytes. Null if no limits." - ) - object_storage_count: Optional[StrictInt] = Field( - description="Maximum number of object storage files. Null if no limits." - ) + instance_sizes: Optional[List[StrictStr]] = Field(description="Allowed instance sizes. Null if no limits.") + resource_types: Optional[List[StrictStr]] = Field(description="Allowed resource types. Null if no limits.") + num_instances: Optional[StrictInt] = Field(description="Maximum number of active instances. Null if no limits.") + auto_shutoff: Optional[StrictInt] = Field(description="Maximum allowed auto-shutoff. Null if no limits.") + storage_in_gb: Optional[StrictInt] = Field(description="Total allowed storage in GiB. Null if no limits.") + num_shared_folders: Optional[StrictInt] = Field(description="Maximum number of shared folders. Null if no limits.") + object_storage_bytes: Optional[StrictInt] = Field(description="Maximum allowed object storage bytes. Null if no limits.") + object_storage_count: Optional[StrictInt] = Field(description="Maximum number of object storage files. Null if no limits.") hours_per_day: Optional[StrictInt] = Field(description="Free compute hours per day.") hours_per_month: Optional[StrictInt] = Field(description="Free compute hours per month.") - hours_forever: Optional[StrictInt] = Field( - description="Free compute hours forever (one-time grant)." - ) - __properties: ClassVar[List[str]] = [ - "id", - "org_id", - "created_at", - "name", - "is_default", - "instance_sizes", - "resource_types", - "num_instances", - "auto_shutoff", - "storage_in_gb", - "num_shared_folders", - "object_storage_bytes", - "object_storage_count", - "hours_per_day", - "hours_per_month", - "hours_forever", - ] + hours_forever: Optional[StrictInt] = Field(description="Free compute hours forever (one-time grant).") + __properties: ClassVar[List[str]] = ["id", "org_id", "created_at", "name", "is_default", "instance_sizes", "resource_types", "num_instances", "auto_shutoff", "storage_in_gb", "num_shared_folders", "object_storage_bytes", "object_storage_count", "hours_per_day", "hours_per_month", "hours_forever"] model_config = ConfigDict( populate_by_name=True, @@ -87,6 +51,7 @@ class UsageLimits(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -127,26 +92,24 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "org_id", - "created_at", - "name", - "is_default", - "instance_sizes", - "resource_types", - "num_instances", - "auto_shutoff", - "storage_in_gb", - "num_shared_folders", - "object_storage_bytes", - "object_storage_count", - "hours_per_day", - "hours_per_month", - "hours_forever", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "org_id", + "created_at", + "name", + "is_default", + "instance_sizes", + "resource_types", + "num_instances", + "auto_shutoff", + "storage_in_gb", + "num_shared_folders", + "object_storage_bytes", + "object_storage_count", + "hours_per_day", + "hours_per_month", + "hours_forever", + ]) _dict = self.model_dump( by_alias=True, @@ -156,57 +119,57 @@ def to_dict(self) -> Dict[str, Any]: # set to None if instance_sizes (nullable) is None # and model_fields_set contains the field if self.instance_sizes is None and "instance_sizes" in self.model_fields_set: - _dict["instance_sizes"] = None + _dict['instance_sizes'] = None # set to None if resource_types (nullable) is None # and model_fields_set contains the field if self.resource_types is None and "resource_types" in self.model_fields_set: - _dict["resource_types"] = None + _dict['resource_types'] = None # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: - _dict["num_instances"] = None + _dict['num_instances'] = None # set to None if auto_shutoff (nullable) is None # and model_fields_set contains the field if self.auto_shutoff is None and "auto_shutoff" in self.model_fields_set: - _dict["auto_shutoff"] = None + _dict['auto_shutoff'] = None # set to None if storage_in_gb (nullable) is None # and model_fields_set contains the field if self.storage_in_gb is None and "storage_in_gb" in self.model_fields_set: - _dict["storage_in_gb"] = None + _dict['storage_in_gb'] = None # set to None if num_shared_folders (nullable) is None # and model_fields_set contains the field if self.num_shared_folders is None and "num_shared_folders" in self.model_fields_set: - _dict["num_shared_folders"] = None + _dict['num_shared_folders'] = None # set to None if object_storage_bytes (nullable) is None # and model_fields_set contains the field if self.object_storage_bytes is None and "object_storage_bytes" in self.model_fields_set: - _dict["object_storage_bytes"] = None + _dict['object_storage_bytes'] = None # set to None if object_storage_count (nullable) is None # and model_fields_set contains the field if self.object_storage_count is None and "object_storage_count" in self.model_fields_set: - _dict["object_storage_count"] = None + _dict['object_storage_count'] = None # set to None if hours_per_day (nullable) is None # and model_fields_set contains the field if self.hours_per_day is None and "hours_per_day" in self.model_fields_set: - _dict["hours_per_day"] = None + _dict['hours_per_day'] = None # set to None if hours_per_month (nullable) is None # and model_fields_set contains the field if self.hours_per_month is None and "hours_per_month" in self.model_fields_set: - _dict["hours_per_month"] = None + _dict['hours_per_month'] = None # set to None if hours_forever (nullable) is None # and model_fields_set contains the field if self.hours_forever is None and "hours_forever" in self.model_fields_set: - _dict["hours_forever"] = None + _dict['hours_forever'] = None return _dict @@ -219,24 +182,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "org_id": obj.get("org_id"), - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "is_default": obj.get("is_default"), - "instance_sizes": obj.get("instance_sizes"), - "resource_types": obj.get("resource_types"), - "num_instances": obj.get("num_instances"), - "auto_shutoff": obj.get("auto_shutoff"), - "storage_in_gb": obj.get("storage_in_gb"), - "num_shared_folders": obj.get("num_shared_folders"), - "object_storage_bytes": obj.get("object_storage_bytes"), - "object_storage_count": obj.get("object_storage_count"), - "hours_per_day": obj.get("hours_per_day"), - "hours_per_month": obj.get("hours_per_month"), - "hours_forever": obj.get("hours_forever"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "created_at": obj.get("created_at"), + "name": obj.get("name"), + "is_default": obj.get("is_default"), + "instance_sizes": obj.get("instance_sizes"), + "resource_types": obj.get("resource_types"), + "num_instances": obj.get("num_instances"), + "auto_shutoff": obj.get("auto_shutoff"), + "storage_in_gb": obj.get("storage_in_gb"), + "num_shared_folders": obj.get("num_shared_folders"), + "object_storage_bytes": obj.get("object_storage_bytes"), + "object_storage_count": obj.get("object_storage_count"), + "hours_per_day": obj.get("hours_per_day"), + "hours_per_month": obj.get("hours_per_month"), + "hours_forever": obj.get("hours_forever") + }) return _obj + + diff --git a/saturn_api/models/usage_limits_create.py b/saturn_api/models/usage_limits_create.py index ecc2b31..2334a5f 100644 --- a/saturn_api/models/usage_limits_create.py +++ b/saturn_api/models/usage_limits_create.py @@ -1,88 +1,47 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class UsageLimitsCreate(BaseModel): """ UsageLimitsCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the usage limit.") - org_id: Optional[StrictStr] = Field( - default=None, description="Org ID that the usage limit belongs to." - ) - is_default: Optional[StrictBool] = Field( - default=False, description="Default usage limit for the org." - ) - instance_sizes: Optional[List[StrictStr]] = Field( - default=None, description="Allowed instance sizes. Null if no limits." - ) - resource_types: Optional[List[StrictStr]] = Field( - default=None, description="Allowed resource types. Null if no limits." - ) - num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of active instances. Null if no limits." - ) - auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum allowed auto-shutoff. Null if no limits." - ) - storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Total allowed storage in GiB. Null if no limits." - ) - num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of shared folders. Null if no limits." - ) - object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum allowed object storage bytes. Null if no limits." - ) - object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of object storage files. Null if no limits." - ) - hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Free compute hours per day." - ) - hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Free compute hours per month." - ) - hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Free compute hours forever (one-time grant)." - ) - __properties: ClassVar[List[str]] = [ - "name", - "org_id", - "is_default", - "instance_sizes", - "resource_types", - "num_instances", - "auto_shutoff", - "storage_in_gb", - "num_shared_folders", - "object_storage_bytes", - "object_storage_count", - "hours_per_day", - "hours_per_month", - "hours_forever", - ] + org_id: Optional[StrictStr] = Field(default=None, description="Org ID that the usage limit belongs to.") + is_default: Optional[StrictBool] = Field(default=False, description="Default usage limit for the org.") + instance_sizes: Optional[List[StrictStr]] = Field(default=None, description="Allowed instance sizes. Null if no limits.") + resource_types: Optional[List[StrictStr]] = Field(default=None, description="Allowed resource types. Null if no limits.") + num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of active instances. Null if no limits.") + auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed auto-shutoff. Null if no limits.") + storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Total allowed storage in GiB. Null if no limits.") + num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of shared folders. Null if no limits.") + object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed object storage bytes. Null if no limits.") + object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of object storage files. Null if no limits.") + hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per day.") + hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per month.") + hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours forever (one-time grant).") + __properties: ClassVar[List[str]] = ["name", "org_id", "is_default", "instance_sizes", "resource_types", "num_instances", "auto_shutoff", "storage_in_gb", "num_shared_folders", "object_storage_bytes", "object_storage_count", "hours_per_day", "hours_per_month", "hours_forever"] model_config = ConfigDict( populate_by_name=True, @@ -90,6 +49,7 @@ class UsageLimitsCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -114,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,57 +85,57 @@ def to_dict(self) -> Dict[str, Any]: # set to None if instance_sizes (nullable) is None # and model_fields_set contains the field if self.instance_sizes is None and "instance_sizes" in self.model_fields_set: - _dict["instance_sizes"] = None + _dict['instance_sizes'] = None # set to None if resource_types (nullable) is None # and model_fields_set contains the field if self.resource_types is None and "resource_types" in self.model_fields_set: - _dict["resource_types"] = None + _dict['resource_types'] = None # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: - _dict["num_instances"] = None + _dict['num_instances'] = None # set to None if auto_shutoff (nullable) is None # and model_fields_set contains the field if self.auto_shutoff is None and "auto_shutoff" in self.model_fields_set: - _dict["auto_shutoff"] = None + _dict['auto_shutoff'] = None # set to None if storage_in_gb (nullable) is None # and model_fields_set contains the field if self.storage_in_gb is None and "storage_in_gb" in self.model_fields_set: - _dict["storage_in_gb"] = None + _dict['storage_in_gb'] = None # set to None if num_shared_folders (nullable) is None # and model_fields_set contains the field if self.num_shared_folders is None and "num_shared_folders" in self.model_fields_set: - _dict["num_shared_folders"] = None + _dict['num_shared_folders'] = None # set to None if object_storage_bytes (nullable) is None # and model_fields_set contains the field if self.object_storage_bytes is None and "object_storage_bytes" in self.model_fields_set: - _dict["object_storage_bytes"] = None + _dict['object_storage_bytes'] = None # set to None if object_storage_count (nullable) is None # and model_fields_set contains the field if self.object_storage_count is None and "object_storage_count" in self.model_fields_set: - _dict["object_storage_count"] = None + _dict['object_storage_count'] = None # set to None if hours_per_day (nullable) is None # and model_fields_set contains the field if self.hours_per_day is None and "hours_per_day" in self.model_fields_set: - _dict["hours_per_day"] = None + _dict['hours_per_day'] = None # set to None if hours_per_month (nullable) is None # and model_fields_set contains the field if self.hours_per_month is None and "hours_per_month" in self.model_fields_set: - _dict["hours_per_month"] = None + _dict['hours_per_month'] = None # set to None if hours_forever (nullable) is None # and model_fields_set contains the field if self.hours_forever is None and "hours_forever" in self.model_fields_set: - _dict["hours_forever"] = None + _dict['hours_forever'] = None return _dict @@ -187,22 +148,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "org_id": obj.get("org_id"), - "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, - "instance_sizes": obj.get("instance_sizes"), - "resource_types": obj.get("resource_types"), - "num_instances": obj.get("num_instances"), - "auto_shutoff": obj.get("auto_shutoff"), - "storage_in_gb": obj.get("storage_in_gb"), - "num_shared_folders": obj.get("num_shared_folders"), - "object_storage_bytes": obj.get("object_storage_bytes"), - "object_storage_count": obj.get("object_storage_count"), - "hours_per_day": obj.get("hours_per_day"), - "hours_per_month": obj.get("hours_per_month"), - "hours_forever": obj.get("hours_forever"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "org_id": obj.get("org_id"), + "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, + "instance_sizes": obj.get("instance_sizes"), + "resource_types": obj.get("resource_types"), + "num_instances": obj.get("num_instances"), + "auto_shutoff": obj.get("auto_shutoff"), + "storage_in_gb": obj.get("storage_in_gb"), + "num_shared_folders": obj.get("num_shared_folders"), + "object_storage_bytes": obj.get("object_storage_bytes"), + "object_storage_count": obj.get("object_storage_count"), + "hours_per_day": obj.get("hours_per_day"), + "hours_per_month": obj.get("hours_per_month"), + "hours_forever": obj.get("hours_forever") + }) return _obj + + diff --git a/saturn_api/models/usage_limits_list.py b/saturn_api/models/usage_limits_list.py index e046cc3..fc93e77 100644 --- a/saturn_api/models/usage_limits_list.py +++ b/saturn_api/models/usage_limits_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.usage_limits import UsageLimits - +from typing import Literal, Optional, Set +from typing_extensions import Self class UsageLimitsList(BaseModel): """ UsageLimitsList - """ # noqa: E501 - + """ # noqa: E501 usage_limits: List[UsageLimits] = Field(description="List of usage limits.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class UsageLimitsList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "usage_limits", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "usage_limits", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_usage_limits in self.usage_limits: if _item_usage_limits: _items.append(_item_usage_limits.to_dict()) - _dict["usage_limits"] = _items + _dict['usage_limits'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage_limits": ( - [UsageLimits.from_dict(_item) for _item in obj["usage_limits"]] - if obj.get("usage_limits") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "usage_limits": [UsageLimits.from_dict(_item) for _item in obj["usage_limits"]] if obj.get("usage_limits") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/usage_limits_update.py b/saturn_api/models/usage_limits_update.py index 8c04dd1..f88d698 100644 --- a/saturn_api/models/usage_limits_update.py +++ b/saturn_api/models/usage_limits_update.py @@ -1,84 +1,46 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class UsageLimitsUpdate(BaseModel): """ UsageLimitsUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the usage limit.") - is_default: Optional[StrictBool] = Field( - default=None, description="Default usage limit for the org." - ) - instance_sizes: Optional[List[StrictStr]] = Field( - default=None, description="Allowed instance sizes. Null if no limits." - ) - resource_types: Optional[List[StrictStr]] = Field( - default=None, description="Allowed resource types. Null if no limits." - ) - num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of active instances. Null if no limits." - ) - auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum allowed auto-shutoff. Null if no limits." - ) - storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Total allowed storage in GiB. Null if no limits." - ) - num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of shared folders. Null if no limits." - ) - object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum allowed object storage bytes. Null if no limits." - ) - object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Maximum number of object storage files. Null if no limits." - ) - hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Free compute hours per day." - ) - hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Free compute hours per month." - ) - hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Free compute hours forever (one-time grant)." - ) - __properties: ClassVar[List[str]] = [ - "name", - "is_default", - "instance_sizes", - "resource_types", - "num_instances", - "auto_shutoff", - "storage_in_gb", - "num_shared_folders", - "object_storage_bytes", - "object_storage_count", - "hours_per_day", - "hours_per_month", - "hours_forever", - ] + is_default: Optional[StrictBool] = Field(default=None, description="Default usage limit for the org.") + instance_sizes: Optional[List[StrictStr]] = Field(default=None, description="Allowed instance sizes. Null if no limits.") + resource_types: Optional[List[StrictStr]] = Field(default=None, description="Allowed resource types. Null if no limits.") + num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of active instances. Null if no limits.") + auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed auto-shutoff. Null if no limits.") + storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Total allowed storage in GiB. Null if no limits.") + num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of shared folders. Null if no limits.") + object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed object storage bytes. Null if no limits.") + object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of object storage files. Null if no limits.") + hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per day.") + hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per month.") + hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours forever (one-time grant).") + __properties: ClassVar[List[str]] = ["name", "is_default", "instance_sizes", "resource_types", "num_instances", "auto_shutoff", "storage_in_gb", "num_shared_folders", "object_storage_bytes", "object_storage_count", "hours_per_day", "hours_per_month", "hours_forever"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +48,7 @@ class UsageLimitsUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -110,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -120,57 +84,57 @@ def to_dict(self) -> Dict[str, Any]: # set to None if instance_sizes (nullable) is None # and model_fields_set contains the field if self.instance_sizes is None and "instance_sizes" in self.model_fields_set: - _dict["instance_sizes"] = None + _dict['instance_sizes'] = None # set to None if resource_types (nullable) is None # and model_fields_set contains the field if self.resource_types is None and "resource_types" in self.model_fields_set: - _dict["resource_types"] = None + _dict['resource_types'] = None # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: - _dict["num_instances"] = None + _dict['num_instances'] = None # set to None if auto_shutoff (nullable) is None # and model_fields_set contains the field if self.auto_shutoff is None and "auto_shutoff" in self.model_fields_set: - _dict["auto_shutoff"] = None + _dict['auto_shutoff'] = None # set to None if storage_in_gb (nullable) is None # and model_fields_set contains the field if self.storage_in_gb is None and "storage_in_gb" in self.model_fields_set: - _dict["storage_in_gb"] = None + _dict['storage_in_gb'] = None # set to None if num_shared_folders (nullable) is None # and model_fields_set contains the field if self.num_shared_folders is None and "num_shared_folders" in self.model_fields_set: - _dict["num_shared_folders"] = None + _dict['num_shared_folders'] = None # set to None if object_storage_bytes (nullable) is None # and model_fields_set contains the field if self.object_storage_bytes is None and "object_storage_bytes" in self.model_fields_set: - _dict["object_storage_bytes"] = None + _dict['object_storage_bytes'] = None # set to None if object_storage_count (nullable) is None # and model_fields_set contains the field if self.object_storage_count is None and "object_storage_count" in self.model_fields_set: - _dict["object_storage_count"] = None + _dict['object_storage_count'] = None # set to None if hours_per_day (nullable) is None # and model_fields_set contains the field if self.hours_per_day is None and "hours_per_day" in self.model_fields_set: - _dict["hours_per_day"] = None + _dict['hours_per_day'] = None # set to None if hours_per_month (nullable) is None # and model_fields_set contains the field if self.hours_per_month is None and "hours_per_month" in self.model_fields_set: - _dict["hours_per_month"] = None + _dict['hours_per_month'] = None # set to None if hours_forever (nullable) is None # and model_fields_set contains the field if self.hours_forever is None and "hours_forever" in self.model_fields_set: - _dict["hours_forever"] = None + _dict['hours_forever'] = None return _dict @@ -183,21 +147,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "is_default": obj.get("is_default"), - "instance_sizes": obj.get("instance_sizes"), - "resource_types": obj.get("resource_types"), - "num_instances": obj.get("num_instances"), - "auto_shutoff": obj.get("auto_shutoff"), - "storage_in_gb": obj.get("storage_in_gb"), - "num_shared_folders": obj.get("num_shared_folders"), - "object_storage_bytes": obj.get("object_storage_bytes"), - "object_storage_count": obj.get("object_storage_count"), - "hours_per_day": obj.get("hours_per_day"), - "hours_per_month": obj.get("hours_per_month"), - "hours_forever": obj.get("hours_forever"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "is_default": obj.get("is_default"), + "instance_sizes": obj.get("instance_sizes"), + "resource_types": obj.get("resource_types"), + "num_instances": obj.get("num_instances"), + "auto_shutoff": obj.get("auto_shutoff"), + "storage_in_gb": obj.get("storage_in_gb"), + "num_shared_folders": obj.get("num_shared_folders"), + "object_storage_bytes": obj.get("object_storage_bytes"), + "object_storage_count": obj.get("object_storage_count"), + "hours_per_day": obj.get("hours_per_day"), + "hours_per_month": obj.get("hours_per_month"), + "hours_forever": obj.get("hours_forever") + }) return _obj + + diff --git a/saturn_api/models/usage_owner.py b/saturn_api/models/usage_owner.py index 7d49319..8aacc37 100644 --- a/saturn_api/models/usage_owner.py +++ b/saturn_api/models/usage_owner.py @@ -1,35 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class UsageOwner(BaseModel): """ UsageOwner - """ # noqa: E501 - - name: Optional[StrictStr] = Field( - default=None, description="Name of the identity of the usage record." - ) + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the identity of the usage record.") identity_type: StrictStr = Field(description="Type of the identity of the usage record.") user_id: Optional[StrictStr] = Field(default=None, description="User ID of the usage record") group_id: Optional[StrictStr] = Field(default=None, description="Group ID of the usage record.") @@ -41,6 +38,7 @@ class UsageOwner(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "user_id", - "group_id", - ] - ) + excluded_fields: Set[str] = set([ + "user_id", + "group_id", + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if name (nullable) is None # and model_fields_set contains the field if self.name is None and "name" in self.model_fields_set: - _dict["name"] = None + _dict['name'] = None return _dict @@ -95,12 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "identity_type": obj.get("identity_type"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "identity_type": obj.get("identity_type"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id") + }) return _obj + + diff --git a/saturn_api/models/user.py b/saturn_api/models/user.py index edf370c..b373c14 100644 --- a/saturn_api/models/user.py +++ b/saturn_api/models/user.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class User(BaseModel): """ User - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the user.") avatar_url: StrictStr = Field(description="Avatar URL of the user.") username: StrictStr = Field(description="Name of the user.") @@ -38,6 +37,7 @@ class User(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,13 +65,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "avatar_url", - "username", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "avatar_url", + "username", + ]) _dict = self.model_dump( by_alias=True, @@ -89,11 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "avatar_url": obj.get("avatar_url"), - "username": obj.get("username"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "avatar_url": obj.get("avatar_url"), + "username": obj.get("username") + }) return _obj + + diff --git a/saturn_api/models/user_admin_create.py b/saturn_api/models/user_admin_create.py index 82b5b29..c794828 100644 --- a/saturn_api/models/user_admin_create.py +++ b/saturn_api/models/user_admin_create.py @@ -1,58 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class UserAdminCreate(BaseModel): """ UserAdminCreate - """ # noqa: E501 - + """ # noqa: E501 username: StrictStr = Field(description="Name of the user.") email: StrictStr = Field(description="Email of the user.") full_name: Optional[StrictStr] = Field(default=None, description="Full name of the user.") - admin: Optional[StrictBool] = Field( - default=False, description="Enable user to take privileged actions in the API." - ) - limits_id: Optional[StrictStr] = Field( - default=None, description="Usage limits ID applied to the user in the primary org." - ) - send_reset_email: Optional[StrictBool] = Field( - default=True, description="Send password reset to the user's email on create." - ) + admin: Optional[StrictBool] = Field(default=False, description="Enable user to take privileged actions in the API.") + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the user in the primary org.") + send_reset_email: Optional[StrictBool] = Field(default=True, description="Send password reset to the user's email on create.") locked: Optional[StrictBool] = Field(default=False, description="Lock the user.") - prevent_duplicate_emails: Optional[StrictBool] = Field( - default=False, description="Prevent creating user with duplicate email." - ) - __properties: ClassVar[List[str]] = [ - "username", - "email", - "full_name", - "admin", - "limits_id", - "send_reset_email", - "locked", - "prevent_duplicate_emails", - ] + prevent_duplicate_emails: Optional[StrictBool] = Field(default=False, description="Prevent creating user with duplicate email.") + __properties: ClassVar[List[str]] = ["username", "email", "full_name", "admin", "limits_id", "send_reset_email", "locked", "prevent_duplicate_emails"] model_config = ConfigDict( populate_by_name=True, @@ -60,6 +42,7 @@ class UserAdminCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None return _dict @@ -107,22 +91,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "username": obj.get("username"), - "email": obj.get("email"), - "full_name": obj.get("full_name"), - "admin": obj.get("admin") if obj.get("admin") is not None else False, - "limits_id": obj.get("limits_id"), - "send_reset_email": ( - obj.get("send_reset_email") if obj.get("send_reset_email") is not None else True - ), - "locked": obj.get("locked") if obj.get("locked") is not None else False, - "prevent_duplicate_emails": ( - obj.get("prevent_duplicate_emails") - if obj.get("prevent_duplicate_emails") is not None - else False - ), - } - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "email": obj.get("email"), + "full_name": obj.get("full_name"), + "admin": obj.get("admin") if obj.get("admin") is not None else False, + "limits_id": obj.get("limits_id"), + "send_reset_email": obj.get("send_reset_email") if obj.get("send_reset_email") is not None else True, + "locked": obj.get("locked") if obj.get("locked") is not None else False, + "prevent_duplicate_emails": obj.get("prevent_duplicate_emails") if obj.get("prevent_duplicate_emails") is not None else False + }) return _obj + + diff --git a/saturn_api/models/user_detailed.py b/saturn_api/models/user_detailed.py index 40ea3bd..ca4acc1 100644 --- a/saturn_api/models/user_detailed.py +++ b/saturn_api/models/user_detailed.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class UserDetailed(BaseModel): """ UserDetailed - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the user.") avatar_url: StrictStr = Field(description="Avatar URL of the user.") username: StrictStr = Field(description="Name of the user.") @@ -38,19 +37,7 @@ class UserDetailed(BaseModel): locked_reason: StrictStr = Field(description="Reason the user is locked.") is_multiple_ssh_keys: StrictBool = Field(description="Enable multiple SSH keys.") active: StrictBool = Field(description="True if user is active.") - __properties: ClassVar[List[str]] = [ - "id", - "avatar_url", - "username", - "created_at", - "full_name", - "email", - "admin", - "locked", - "locked_reason", - "is_multiple_ssh_keys", - "active", - ] + __properties: ClassVar[List[str]] = ["id", "avatar_url", "username", "created_at", "full_name", "email", "admin", "locked", "locked_reason", "is_multiple_ssh_keys", "active"] model_config = ConfigDict( populate_by_name=True, @@ -58,6 +45,7 @@ class UserDetailed(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -93,21 +81,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "avatar_url", - "username", - "created_at", - "full_name", - "email", - "admin", - "locked", - "locked_reason", - "is_multiple_ssh_keys", - "active", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "avatar_url", + "username", + "created_at", + "full_name", + "email", + "admin", + "locked", + "locked_reason", + "is_multiple_ssh_keys", + "active", + ]) _dict = self.model_dump( by_alias=True, @@ -125,19 +111,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "avatar_url": obj.get("avatar_url"), - "username": obj.get("username"), - "created_at": obj.get("created_at"), - "full_name": obj.get("full_name"), - "email": obj.get("email"), - "admin": obj.get("admin"), - "locked": obj.get("locked"), - "locked_reason": obj.get("locked_reason"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "active": obj.get("active"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "avatar_url": obj.get("avatar_url"), + "username": obj.get("username"), + "created_at": obj.get("created_at"), + "full_name": obj.get("full_name"), + "email": obj.get("email"), + "admin": obj.get("admin"), + "locked": obj.get("locked"), + "locked_reason": obj.get("locked_reason"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "active": obj.get("active") + }) return _obj + + diff --git a/saturn_api/models/user_detailed_list.py b/saturn_api/models/user_detailed_list.py index b054b1e..43bedb2 100644 --- a/saturn_api/models/user_detailed_list.py +++ b/saturn_api/models/user_detailed_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.user_detailed import UserDetailed - +from typing import Literal, Optional, Set +from typing_extensions import Self class UserDetailedList(BaseModel): """ UserDetailedList - """ # noqa: E501 - + """ # noqa: E501 users: List[UserDetailed] = Field(description="List of detailed users.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class UserDetailedList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "users", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "users", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_users in self.users: if _item_users: _items.append(_item_users.to_dict()) - _dict["users"] = _items + _dict['users'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "users": ( - [UserDetailed.from_dict(_item) for _item in obj["users"]] - if obj.get("users") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "users": [UserDetailed.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/user_list.py b/saturn_api/models/user_list.py index 98dbaa2..04f6d90 100644 --- a/saturn_api/models/user_list.py +++ b/saturn_api/models/user_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.user import User - +from typing import Literal, Optional, Set +from typing_extensions import Self class UserList(BaseModel): """ UserList - """ # noqa: E501 - + """ # noqa: E501 users: List[User] = Field(description="List of users.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class UserList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,11 +64,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "users", - ] - ) + excluded_fields: Set[str] = set([ + "users", + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_users in self.users: if _item_users: _items.append(_item_users.to_dict()) - _dict["users"] = _items + _dict['users'] = _items return _dict @classmethod @@ -94,15 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "users": ( - [User.from_dict(_item) for _item in obj["users"]] - if obj.get("users") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/user_owner_list.py b/saturn_api/models/user_owner_list.py index 309cd95..ec17470 100644 --- a/saturn_api/models/user_owner_list.py +++ b/saturn_api/models/user_owner_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.owner_user_detailed import OwnerUserDetailed - +from typing import Literal, Optional, Set +from typing_extensions import Self class UserOwnerList(BaseModel): """ UserOwnerList - """ # noqa: E501 - + """ # noqa: E501 owners: List[OwnerUserDetailed] = Field(description="List of user owners.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class UserOwnerList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "owners", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "owners", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict["owners"] = _items + _dict['owners'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "owners": ( - [OwnerUserDetailed.from_dict(_item) for _item in obj["owners"]] - if obj.get("owners") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "owners": [OwnerUserDetailed.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/user_preferences.py b/saturn_api/models/user_preferences.py index 645654c..5124be1 100644 --- a/saturn_api/models/user_preferences.py +++ b/saturn_api/models/user_preferences.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.owner_user_detailed import OwnerUserDetailed - +from typing import Literal, Optional, Set +from typing_extensions import Self class UserPreferences(BaseModel): """ UserPreferences - """ # noqa: E501 - + """ # noqa: E501 default_org_id: StrictStr = Field(description="Default org ID for the user.") default_owner: OwnerUserDetailed = Field(description="Default owner for the user.") __properties: ClassVar[List[str]] = ["default_org_id", "default_owner"] @@ -39,6 +37,7 @@ class UserPreferences(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,12 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "default_org_id", - "default_owner", - ] - ) + excluded_fields: Set[str] = set([ + "default_org_id", + "default_owner", + ]) _dict = self.model_dump( by_alias=True, @@ -79,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of default_owner if self.default_owner: - _dict["default_owner"] = self.default_owner.to_dict() + _dict['default_owner'] = self.default_owner.to_dict() return _dict @classmethod @@ -91,14 +88,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "default_org_id": obj.get("default_org_id"), - "default_owner": ( - OwnerUserDetailed.from_dict(obj["default_owner"]) - if obj.get("default_owner") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "default_org_id": obj.get("default_org_id"), + "default_owner": OwnerUserDetailed.from_dict(obj["default_owner"]) if obj.get("default_owner") is not None else None + }) return _obj + + diff --git a/saturn_api/models/user_preferences_update.py b/saturn_api/models/user_preferences_update.py index 7a73829..97430a2 100644 --- a/saturn_api/models/user_preferences_update.py +++ b/saturn_api/models/user_preferences_update.py @@ -1,32 +1,31 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Literal, Optional, Set from typing_extensions import Self - class UserPreferencesUpdate(BaseModel): """ UserPreferencesUpdate - """ # noqa: E501 - + """ # noqa: E501 default_org_id: StrictStr = Field(description="Default org ID for the user.") __properties: ClassVar[List[str]] = ["default_org_id"] @@ -36,6 +35,7 @@ class UserPreferencesUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"default_org_id": obj.get("default_org_id")}) + _obj = cls.model_validate({ + "default_org_id": obj.get("default_org_id") + }) return _obj + + diff --git a/saturn_api/models/user_update.py b/saturn_api/models/user_update.py index a9db3f9..ca3fc35 100644 --- a/saturn_api/models/user_update.py +++ b/saturn_api/models/user_update.py @@ -1,57 +1,40 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class UserUpdate(BaseModel): """ UserUpdate - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = Field(default=None, description="Name of the user.") full_name: Optional[StrictStr] = Field(default=None, description="Full name of the user.") email: Optional[StrictStr] = Field(default=None, description="Email of the user.") - is_multiple_ssh_keys: Optional[StrictBool] = Field( - default=None, description="Enable multiple SSH keys." - ) + is_multiple_ssh_keys: Optional[StrictBool] = Field(default=None, description="Enable multiple SSH keys.") active: Optional[StrictBool] = Field(default=None, description="True if user is active.") - admin: Optional[StrictBool] = Field( - default=None, description="Enable user to take privileged actions in the API. (Admin only)" - ) + admin: Optional[StrictBool] = Field(default=None, description="Enable user to take privileged actions in the API. (Admin only)") locked: Optional[StrictBool] = Field(default=None, description="Lock the user. (Admin only)") - limits_id: Optional[StrictStr] = Field( - default=None, - description="Usage limits ID applied to the user in the primary org. (Admin only)", - ) - __properties: ClassVar[List[str]] = [ - "username", - "full_name", - "email", - "is_multiple_ssh_keys", - "active", - "admin", - "locked", - "limits_id", - ] + limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the user in the primary org. (Admin only)") + __properties: ClassVar[List[str]] = ["username", "full_name", "email", "is_multiple_ssh_keys", "active", "admin", "locked", "limits_id"] model_config = ConfigDict( populate_by_name=True, @@ -59,6 +42,7 @@ class UserUpdate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -93,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict["limits_id"] = None + _dict['limits_id'] = None return _dict @@ -106,16 +91,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "username": obj.get("username"), - "full_name": obj.get("full_name"), - "email": obj.get("email"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "active": obj.get("active"), - "admin": obj.get("admin"), - "locked": obj.get("locked"), - "limits_id": obj.get("limits_id"), - } - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "full_name": obj.get("full_name"), + "email": obj.get("email"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "active": obj.get("active"), + "admin": obj.get("admin"), + "locked": obj.get("locked"), + "limits_id": obj.get("limits_id") + }) return _obj + + diff --git a/saturn_api/models/users_get200_response.py b/saturn_api/models/users_get200_response.py index 3c65b7f..d25a7cf 100644 --- a/saturn_api/models/users_get200_response.py +++ b/saturn_api/models/users_get200_response.py @@ -1,46 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.user import User from saturn_api.models.user_detailed import UserDetailed +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar USERSGET200RESPONSE_ONE_OF_SCHEMAS = ["User", "UserDetailed"] T = TypeVar("T", User, UserDetailed, default=Union[User, UserDetailed]) - class UsersGet200Response(RootModel[T]): """ UsersGet200Response """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -77,3 +67,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/users_list200_response.py b/saturn_api/models/users_list200_response.py index 3c60d3f..f72605a 100644 --- a/saturn_api/models/users_list200_response.py +++ b/saturn_api/models/users_list200_response.py @@ -1,46 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json import pprint -from typing import Any, Dict, Union - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - RootModel, - StrictStr, - ValidationError, - field_validator, -) -from typing_extensions import Literal, Self, TypeVar - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from saturn_api.models.user_detailed_list import UserDetailedList from saturn_api.models.user_list import UserList +from pydantic import RootModel, StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self, TypeVar USERSLIST200RESPONSE_ONE_OF_SCHEMAS = ["UserDetailedList", "UserList"] T = TypeVar("T", UserDetailedList, UserList, default=Union[UserDetailedList, UserList]) - class UsersList200Response(RootModel[T]): """ UsersList200Response """ - model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -77,3 +67,5 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) + + diff --git a/saturn_api/models/viewer.py b/saturn_api/models/viewer.py index db922cb..3183e4d 100644 --- a/saturn_api/models/viewer.py +++ b/saturn_api/models/viewer.py @@ -1,40 +1,36 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity import Identity - +from typing import Literal, Optional, Set +from typing_extensions import Self class Viewer(BaseModel): """ Viewer - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the viewer.") created_at: StrictStr = Field(description="Creation timestamp.") identity: Identity = Field(description="Identity of the viewer.") - route_id: Optional[StrictStr] = Field( - description="Route ID to allow view access to. If null, all routes are granted." - ) + route_id: Optional[StrictStr] = Field(description="Route ID to allow view access to. If null, all routes are granted.") subdomain: Optional[StrictStr] = Field(description="Subdomain of the route.") __properties: ClassVar[List[str]] = ["id", "created_at", "identity", "route_id", "subdomain"] @@ -44,6 +40,7 @@ class Viewer(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,15 +70,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "created_at", - "identity", - "route_id", - "subdomain", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "created_at", + "identity", + "route_id", + "subdomain", + ]) _dict = self.model_dump( by_alias=True, @@ -90,16 +85,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() # set to None if route_id (nullable) is None # and model_fields_set contains the field if self.route_id is None and "route_id" in self.model_fields_set: - _dict["route_id"] = None + _dict['route_id'] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict["subdomain"] = None + _dict['subdomain'] = None return _dict @@ -112,15 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "identity": ( - Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None - ), - "route_id": obj.get("route_id"), - "subdomain": obj.get("subdomain"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "route_id": obj.get("route_id"), + "subdomain": obj.get("subdomain") + }) return _obj + + diff --git a/saturn_api/models/viewer_create.py b/saturn_api/models/viewer_create.py index d34c736..8cb10ed 100644 --- a/saturn_api/models/viewer_create.py +++ b/saturn_api/models/viewer_create.py @@ -1,39 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.identity_reference import IdentityReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ViewerCreate(BaseModel): """ ViewerCreate - """ # noqa: E501 - + """ # noqa: E501 identity: IdentityReference = Field(description="Reference to an identity.") - route_id: Optional[StrictStr] = Field( - default=None, - description="Route ID to allow view access to. If null, all routes are granted.", - ) + route_id: Optional[StrictStr] = Field(default=None, description="Route ID to allow view access to. If null, all routes are granted.") __properties: ClassVar[List[str]] = ["identity", "route_id"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class ViewerCreate(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,11 +72,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict["identity"] = self.identity.to_dict() + _dict['identity'] = self.identity.to_dict() # set to None if route_id (nullable) is None # and model_fields_set contains the field if self.route_id is None and "route_id" in self.model_fields_set: - _dict["route_id"] = None + _dict['route_id'] = None return _dict @@ -92,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "identity": ( - IdentityReference.from_dict(obj["identity"]) - if obj.get("identity") is not None - else None - ), - "route_id": obj.get("route_id"), - } - ) + _obj = cls.model_validate({ + "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, + "route_id": obj.get("route_id") + }) return _obj + + diff --git a/saturn_api/models/viewer_list.py b/saturn_api/models/viewer_list.py index a8e642d..babfbb7 100644 --- a/saturn_api/models/viewer_list.py +++ b/saturn_api/models/viewer_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.viewer import Viewer - +from typing import Literal, Optional, Set +from typing_extensions import Self class ViewerList(BaseModel): """ ViewerList - """ # noqa: E501 - + """ # noqa: E501 viewers: List[Viewer] = Field(description="List of viewers.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class ViewerList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "viewers", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "viewers", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_viewers in self.viewers: if _item_viewers: _items.append(_item_viewers.to_dict()) - _dict["viewers"] = _items + _dict['viewers'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "viewers": ( - [Viewer.from_dict(_item) for _item in obj["viewers"]] - if obj.get("viewers") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "viewers": [Viewer.from_dict(_item) for _item in obj["viewers"]] if obj.get("viewers") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/viewer_recipe.py b/saturn_api/models/viewer_recipe.py index 679106e..1895696 100644 --- a/saturn_api/models/viewer_recipe.py +++ b/saturn_api/models/viewer_recipe.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.route_reference import RouteReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class ViewerRecipe(BaseModel): """ ViewerRecipe - """ # noqa: E501 - + """ # noqa: E501 identity: StrictStr route: Optional[RouteReference] = None __properties: ClassVar[List[str]] = ["identity", "route"] @@ -39,6 +37,7 @@ class ViewerRecipe(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of route if self.route: - _dict["route"] = self.route.to_dict() + _dict['route'] = self.route.to_dict() return _dict @classmethod @@ -84,12 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "identity": obj.get("identity"), - "route": ( - RouteReference.from_dict(obj["route"]) if obj.get("route") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "identity": obj.get("identity"), + "route": RouteReference.from_dict(obj["route"]) if obj.get("route") is not None else None + }) return _obj + + diff --git a/saturn_api/models/white_label_configuration.py b/saturn_api/models/white_label_configuration.py index 726f7db..125590f 100644 --- a/saturn_api/models/white_label_configuration.py +++ b/saturn_api/models/white_label_configuration.py @@ -1,56 +1,45 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class WhiteLabelConfiguration(BaseModel): """ WhiteLabelConfiguration - """ # noqa: E501 - + """ # noqa: E501 enabled: StrictBool = Field(description="Enable whitelabel configuration.") brand_name: StrictStr = Field(description="Whitelabeled brand name.") - brand_short_name: Optional[StrictStr] = Field( - default=None, description="Short version of the brand name." - ) + brand_short_name: Optional[StrictStr] = Field(default=None, description="Short version of the brand name.") + logo_mode: Optional[StrictStr] = Field(default='icon_and_text', description="Logo display mode: 'icon_and_text' or 'logo_only'.") logo_icon_url: StrictStr = Field(description="Brand icon URL.") logo_full_url: StrictStr = Field(description="Brand full icon URL.") favicon_url: Optional[StrictStr] = Field(default=None, description="Favicon URL.") primary_color: StrictStr = Field(description="Primary frontend color.") + cloud_display_names: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of cloud provider IDs to display names (e.g. {'nebius': 'My Cloud'}).") + cloud_icon_urls: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of cloud provider IDs to icon URLs.") support_email: StrictStr = Field(description="Support contact email.") website_url: StrictStr = Field(description="Website URL.") docs_url: Optional[StrictStr] = Field(default=None, description="Documentation URL.") - __properties: ClassVar[List[str]] = [ - "enabled", - "brand_name", - "brand_short_name", - "logo_icon_url", - "logo_full_url", - "favicon_url", - "primary_color", - "support_email", - "website_url", - "docs_url", - ] + __properties: ClassVar[List[str]] = ["enabled", "brand_name", "brand_short_name", "logo_mode", "logo_icon_url", "logo_full_url", "favicon_url", "primary_color", "cloud_display_names", "cloud_icon_urls", "support_email", "website_url", "docs_url"] model_config = ConfigDict( populate_by_name=True, @@ -58,6 +47,7 @@ class WhiteLabelConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,17 +83,27 @@ def to_dict(self) -> Dict[str, Any]: # set to None if brand_short_name (nullable) is None # and model_fields_set contains the field if self.brand_short_name is None and "brand_short_name" in self.model_fields_set: - _dict["brand_short_name"] = None + _dict['brand_short_name'] = None # set to None if favicon_url (nullable) is None # and model_fields_set contains the field if self.favicon_url is None and "favicon_url" in self.model_fields_set: - _dict["favicon_url"] = None + _dict['favicon_url'] = None + + # set to None if cloud_display_names (nullable) is None + # and model_fields_set contains the field + if self.cloud_display_names is None and "cloud_display_names" in self.model_fields_set: + _dict['cloud_display_names'] = None + + # set to None if cloud_icon_urls (nullable) is None + # and model_fields_set contains the field + if self.cloud_icon_urls is None and "cloud_icon_urls" in self.model_fields_set: + _dict['cloud_icon_urls'] = None # set to None if docs_url (nullable) is None # and model_fields_set contains the field if self.docs_url is None and "docs_url" in self.model_fields_set: - _dict["docs_url"] = None + _dict['docs_url'] = None return _dict @@ -115,18 +116,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "enabled": obj.get("enabled"), - "brand_name": obj.get("brand_name"), - "brand_short_name": obj.get("brand_short_name"), - "logo_icon_url": obj.get("logo_icon_url"), - "logo_full_url": obj.get("logo_full_url"), - "favicon_url": obj.get("favicon_url"), - "primary_color": obj.get("primary_color"), - "support_email": obj.get("support_email"), - "website_url": obj.get("website_url"), - "docs_url": obj.get("docs_url"), - } - ) + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "brand_name": obj.get("brand_name"), + "brand_short_name": obj.get("brand_short_name"), + "logo_mode": obj.get("logo_mode") if obj.get("logo_mode") is not None else 'icon_and_text', + "logo_icon_url": obj.get("logo_icon_url"), + "logo_full_url": obj.get("logo_full_url"), + "favicon_url": obj.get("favicon_url"), + "primary_color": obj.get("primary_color"), + "cloud_display_names": obj.get("cloud_display_names"), + "cloud_icon_urls": obj.get("cloud_icon_urls"), + "support_email": obj.get("support_email"), + "website_url": obj.get("website_url"), + "docs_url": obj.get("docs_url") + }) return _obj + + diff --git a/saturn_api/models/workload_type.py b/saturn_api/models/workload_type.py index e413a9c..a340bae 100644 --- a/saturn_api/models/workload_type.py +++ b/saturn_api/models/workload_type.py @@ -1,21 +1,20 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations +from __future__ import annotations import json from enum import Enum - from typing_extensions import Self @@ -27,13 +26,15 @@ class WorkloadType(str, Enum): """ allowed enum values """ - DASK = "dask" - DEPLOYMENT = "deployment" - IMAGE_BUILD = "image_build" - JOB = "job" - WORKSPACE = "workspace" + DASK = 'dask' + DEPLOYMENT = 'deployment' + IMAGE_BUILD = 'image_build' + JOB = 'job' + WORKSPACE = 'workspace' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of WorkloadType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/saturn_api/models/workspace.py b/saturn_api/models/workspace.py index 142586d..d7a0a92 100644 --- a/saturn_api/models/workspace.py +++ b/saturn_api/models/workspace.py @@ -1,138 +1,79 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictStr, - field_validator, -) -from typing_extensions import Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.dask_cluster_nested import DaskClusterNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.image_tag import ImageTag from saturn_api.models.owner import Owner - +from typing import Literal, Optional, Set +from typing_extensions import Self class Workspace(BaseModel): """ Workspace - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr = Field(description="ID of the workspace") name: StrictStr = Field(description="Name of the workspace.") owner: Owner = Field(description="Owner of the workspace.") description: StrictStr = Field(description="Description of the workspace.") - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the workspace." - ) + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the workspace.") image_tag: ImageTag = Field(description="Image tag that is attached to the workspace.") - extra_packages: Optional[ExtraPackages] = Field( - description="Addtitional packages to install on start." - ) + extra_packages: Optional[ExtraPackages] = Field(description="Addtitional packages to install on start.") ide: StrictStr = Field(description="IDE of the workspace") - start_script: Optional[StrictStr] = Field( - description="Shell script that runs on start before the primary command." - ) - environment_variables: Dict[str, StrictStr] = Field( - description="Mapping of environment variable keys to values." - ) + start_script: Optional[StrictStr] = Field(description="Shell script that runs on start before the primary command.") + environment_variables: Dict[str, StrictStr] = Field(description="Mapping of environment variable keys to values.") working_dir: StrictStr = Field(description="Initial working directory.") - disk_space: StrictStr = Field( - description="Size of the persistent volume attached to the workspace." - ) + disk_space: StrictStr = Field(description="Size of the persistent volume attached to the workspace.") instance_size: StrictStr = Field(description="Instance size of the workspace.") - auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] + auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] start_ssh: StrictBool = Field(description="Enable SSH access on the workspace.") is_spot: StrictBool = Field(description="Enables running on spot instance sizes.") subdomain: StrictStr = Field(description="Subdomain for the workspace URL.") start_dind: StrictBool = Field(description="Enables docker-in-docker.") - resource_type: Literal["workspace"] + resource_type: Literal['workspace'] size_display: StrictStr = Field(description="Description of the instance size.") k8s_name: StrictStr = Field(description="Unique name for associated kubernetes objects.") - require_restart: StrictBool = Field( - description="True if an update was applied that requires restart to take effect" - ) + require_restart: StrictBool = Field(description="True if an update was applied that requires restart to take effect") created_at: StrictStr = Field(description="Creation timestamp.") updated_at: StrictStr = Field(description="Updated timestamp.") started_at: Optional[StrictStr] = Field(description="Last started timestamp.") - self_destruct: Optional[StrictBool] = Field( - default=None, description="Auto delete the workspace on stop." - ) - dask_cluster: Optional[DaskClusterNested] = Field( - default=None, description="Dask cluster attached to the workspace." - ) + self_destruct: Optional[StrictBool] = Field(default=None, description="Auto delete the workspace on stop.") + dask_cluster: Optional[DaskClusterNested] = Field(default=None, description="Dask cluster attached to the workspace.") status: StrictStr = Field(description="Current status of the workspace.") debug_mode: StrictBool = Field(description="True if workspace is running in debug mode.") url: StrictStr = Field(description="External URL for the workspace.") ssh_url: Optional[StrictStr] = Field(description="External SSH URL for the workspace.") - __properties: ClassVar[List[str]] = [ - "id", - "name", - "owner", - "description", - "tags", - "image_tag", - "extra_packages", - "ide", - "start_script", - "environment_variables", - "working_dir", - "disk_space", - "instance_size", - "auto_shutoff", - "start_ssh", - "is_spot", - "subdomain", - "start_dind", - "resource_type", - "size_display", - "k8s_name", - "require_restart", - "created_at", - "updated_at", - "started_at", - "self_destruct", - "dask_cluster", - "status", - "debug_mode", - "url", - "ssh_url", - ] + __properties: ClassVar[List[str]] = ["id", "name", "owner", "description", "tags", "image_tag", "extra_packages", "ide", "start_script", "environment_variables", "working_dir", "disk_space", "instance_size", "auto_shutoff", "start_ssh", "is_spot", "subdomain", "start_dind", "resource_type", "size_display", "k8s_name", "require_restart", "created_at", "updated_at", "started_at", "self_destruct", "dask_cluster", "status", "debug_mode", "url", "ssh_url"] - @field_validator("auto_shutoff") + @field_validator('auto_shutoff') def auto_shutoff_validate_enum(cls, value): """Validates the enum""" - if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): - raise ValueError( - "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" - ) + if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): + raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") return value - @field_validator("resource_type") + @field_validator('resource_type') def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["workspace"]): + if value not in set(['workspace']): raise ValueError("must be one of enum values ('workspace')") return value @@ -142,6 +83,7 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -196,40 +138,38 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "id", - "name", - "owner", - "description", - "image_tag", - "extra_packages", - "ide", - "start_script", - "environment_variables", - "working_dir", - "disk_space", - "instance_size", - "auto_shutoff", - "start_ssh", - "is_spot", - "subdomain", - "start_dind", - "resource_type", - "size_display", - "k8s_name", - "require_restart", - "created_at", - "updated_at", - "started_at", - "self_destruct", - "dask_cluster", - "status", - "debug_mode", - "url", - "ssh_url", - ] - ) + excluded_fields: Set[str] = set([ + "id", + "name", + "owner", + "description", + "image_tag", + "extra_packages", + "ide", + "start_script", + "environment_variables", + "working_dir", + "disk_space", + "instance_size", + "auto_shutoff", + "start_ssh", + "is_spot", + "subdomain", + "start_dind", + "resource_type", + "size_display", + "k8s_name", + "require_restart", + "created_at", + "updated_at", + "started_at", + "self_destruct", + "dask_cluster", + "status", + "debug_mode", + "url", + "ssh_url", + ]) _dict = self.model_dump( by_alias=True, @@ -238,40 +178,40 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image_tag if self.image_tag: - _dict["image_tag"] = self.image_tag.to_dict() + _dict['image_tag'] = self.image_tag.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict["dask_cluster"] = self.dask_cluster.to_dict() + _dict['dask_cluster'] = self.dask_cluster.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if ssh_url (nullable) is None # and model_fields_set contains the field if self.ssh_url is None and "ssh_url" in self.model_fields_set: - _dict["ssh_url"] = None + _dict['ssh_url'] = None return _dict @@ -284,51 +224,39 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_tag": ( - ImageTag.from_dict(obj["image_tag"]) - if obj.get("image_tag") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "ide": obj.get("ide"), - "start_script": obj.get("start_script"), - "environment_variables": obj.get("environment_variables"), - "working_dir": obj.get("working_dir"), - "disk_space": obj.get("disk_space"), - "instance_size": obj.get("instance_size"), - "auto_shutoff": obj.get("auto_shutoff"), - "start_ssh": obj.get("start_ssh"), - "is_spot": obj.get("is_spot"), - "subdomain": obj.get("subdomain"), - "start_dind": obj.get("start_dind"), - "resource_type": obj.get("resource_type"), - "size_display": obj.get("size_display"), - "k8s_name": obj.get("k8s_name"), - "require_restart": obj.get("require_restart"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "started_at": obj.get("started_at"), - "self_destruct": obj.get("self_destruct"), - "dask_cluster": ( - DaskClusterNested.from_dict(obj["dask_cluster"]) - if obj.get("dask_cluster") is not None - else None - ), - "status": obj.get("status"), - "debug_mode": obj.get("debug_mode"), - "url": obj.get("url"), - "ssh_url": obj.get("ssh_url"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_tag": ImageTag.from_dict(obj["image_tag"]) if obj.get("image_tag") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "ide": obj.get("ide"), + "start_script": obj.get("start_script"), + "environment_variables": obj.get("environment_variables"), + "working_dir": obj.get("working_dir"), + "disk_space": obj.get("disk_space"), + "instance_size": obj.get("instance_size"), + "auto_shutoff": obj.get("auto_shutoff"), + "start_ssh": obj.get("start_ssh"), + "is_spot": obj.get("is_spot"), + "subdomain": obj.get("subdomain"), + "start_dind": obj.get("start_dind"), + "resource_type": obj.get("resource_type"), + "size_display": obj.get("size_display"), + "k8s_name": obj.get("k8s_name"), + "require_restart": obj.get("require_restart"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "started_at": obj.get("started_at"), + "self_destruct": obj.get("self_destruct"), + "dask_cluster": DaskClusterNested.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, + "status": obj.get("status"), + "debug_mode": obj.get("debug_mode"), + "url": obj.get("url"), + "ssh_url": obj.get("ssh_url") + }) return _obj + + diff --git a/saturn_api/models/workspace_create.py b/saturn_api/models/workspace_create.py index 86db304..766982f 100644 --- a/saturn_api/models/workspace_create.py +++ b/saturn_api/models/workspace_create.py @@ -1,137 +1,75 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictStr, - field_validator, -) -from typing_extensions import Annotated, Self +import json -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.owner_reference import OwnerReference - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceCreate(BaseModel): """ WorkspaceCreate - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr = Field(description="Name of the workspace.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the workspace.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default="", description="Description of the workspace." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the workspace." - ) - instance_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the workspace." - ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the workspace.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the workspace.") + instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the workspace.") image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field( - default=True, description="Enable image trust validation before attaching." - ) - environment_variables: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Mapping of environment variable keys to values." - ) - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( - default=None, description="List of external repo attachments for the workspace." - ) - extra_packages: Optional[ExtraPackages] = Field( - default=None, description="Addtitional packages to install on start." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script to run on start before the primary command." - ) - working_dir: Optional[StrictStr] = Field( - default="/home/jovyan/workspace", description="Initial working directory for the workspace." - ) - is_spot: Optional[StrictBool] = Field( - default=False, description="Enables running on spot instance sizes." - ) + image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") + environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments for the workspace.") + extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script to run on start before the primary command.") + working_dir: Optional[StrictStr] = Field(default='/home/jovyan/workspace', description="Initial working directory for the workspace.") + is_spot: Optional[StrictBool] = Field(default=False, description="Enables running on spot instance sizes.") start_dind: Optional[StrictBool] = Field(default=False, description="Enables docker-in-docker.") - disk_space: Optional[StrictStr] = Field( - default=None, description="Size of the persistent volume attached to the workspace." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="Subdomain of the workspace URL." - ) - auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] = "1 hour" - start_ssh: Optional[StrictBool] = Field( - default=False, description="Enable SSH access on the deployment." - ) - ide: Literal["jupyter", "rstudio"] = "jupyter" - self_destruct: Optional[StrictBool] = Field( - default=False, description="Auto delete the workspace on stop." - ) - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "tags", - "instance_size", - "image_uri", - "image_tag_id", - "image_enforce_trusted", - "environment_variables", - "external_repo_attachments", - "extra_packages", - "start_script", - "working_dir", - "is_spot", - "start_dind", - "disk_space", - "subdomain", - "auto_shutoff", - "start_ssh", - "ide", - "self_destruct", - ] - - @field_validator("auto_shutoff") + disk_space: Optional[StrictStr] = Field(default=None, description="Size of the persistent volume attached to the workspace.") + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain of the workspace URL.") + auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] = '1 hour' + start_ssh: Optional[StrictBool] = Field(default=False, description="Enable SSH access on the deployment.") + ide: Literal['jupyter', 'rstudio'] = 'jupyter' + self_destruct: Optional[StrictBool] = Field(default=False, description="Auto delete the workspace on stop.") + __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "instance_size", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "is_spot", "start_dind", "disk_space", "subdomain", "auto_shutoff", "start_ssh", "ide", "self_destruct"] + + @field_validator('auto_shutoff') def auto_shutoff_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): - raise ValueError( - "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" - ) + if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): + raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") return value - @field_validator("ide") + @field_validator('ide') def ide_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["jupyter", "rstudio"]): + if value not in set(['jupyter', 'rstudio']): raise ValueError("must be one of enum values ('jupyter', 'rstudio')") return value @@ -141,6 +79,7 @@ def ide_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -165,7 +104,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -174,44 +114,41 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in external_repo_attachments (list) _items = [] if self.external_repo_attachments: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if environment_variables (nullable) is None # and model_fields_set contains the field if self.environment_variables is None and "environment_variables" in self.model_fields_set: - _dict["environment_variables"] = None + _dict['environment_variables'] = None # set to None if external_repo_attachments (nullable) is None # and model_fields_set contains the field - if ( - self.external_repo_attachments is None - and "external_repo_attachments" in self.model_fields_set - ): - _dict["external_repo_attachments"] = None + if self.external_repo_attachments is None and "external_repo_attachments" in self.model_fields_set: + _dict['external_repo_attachments'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None return _dict @@ -224,54 +161,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description") if obj.get("description") is not None else "", - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": ( - obj.get("image_enforce_trusted") - if obj.get("image_enforce_trusted") is not None - else True - ), - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": ( - [ - ExternalRepoAttachmentNested.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "working_dir": ( - obj.get("working_dir") - if obj.get("working_dir") is not None - else "/home/jovyan/workspace" - ), - "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, - "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, - "disk_space": obj.get("disk_space"), - "subdomain": obj.get("subdomain"), - "auto_shutoff": ( - obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else "1 hour" - ), - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - "ide": obj.get("ide") if obj.get("ide") is not None else "jupyter", - "self_destruct": ( - obj.get("self_destruct") if obj.get("self_destruct") is not None else False - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description") if obj.get("description") is not None else '', + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir") if obj.get("working_dir") is not None else '/home/jovyan/workspace', + "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, + "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, + "disk_space": obj.get("disk_space"), + "subdomain": obj.get("subdomain"), + "auto_shutoff": obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else '1 hour', + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + "ide": obj.get("ide") if obj.get("ide") is not None else 'jupyter', + "self_destruct": obj.get("self_destruct") if obj.get("self_destruct") is not None else False + }) return _obj + + diff --git a/saturn_api/models/workspace_ide_default_images.py b/saturn_api/models/workspace_ide_default_images.py index 725ed12..f7dc8dd 100644 --- a/saturn_api/models/workspace_ide_default_images.py +++ b/saturn_api/models/workspace_ide_default_images.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.default_images import DefaultImages - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceIdeDefaultImages(BaseModel): """ WorkspaceIdeDefaultImages - """ # noqa: E501 - + """ # noqa: E501 jupyter: DefaultImages = Field(description="Default images for jupyter workspaces.") rstudio: DefaultImages = Field(description="Default images for rstudio workspaces.") __properties: ClassVar[List[str]] = ["jupyter", "rstudio"] @@ -39,6 +37,7 @@ class WorkspaceIdeDefaultImages(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,12 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "jupyter", - "rstudio", - ] - ) + excluded_fields: Set[str] = set([ + "jupyter", + "rstudio", + ]) _dict = self.model_dump( by_alias=True, @@ -79,10 +76,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of jupyter if self.jupyter: - _dict["jupyter"] = self.jupyter.to_dict() + _dict['jupyter'] = self.jupyter.to_dict() # override the default output from pydantic by calling `to_dict()` of rstudio if self.rstudio: - _dict["rstudio"] = self.rstudio.to_dict() + _dict['rstudio'] = self.rstudio.to_dict() return _dict @classmethod @@ -94,18 +91,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "jupyter": ( - DefaultImages.from_dict(obj["jupyter"]) - if obj.get("jupyter") is not None - else None - ), - "rstudio": ( - DefaultImages.from_dict(obj["rstudio"]) - if obj.get("rstudio") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "jupyter": DefaultImages.from_dict(obj["jupyter"]) if obj.get("jupyter") is not None else None, + "rstudio": DefaultImages.from_dict(obj["rstudio"]) if obj.get("rstudio") is not None else None + }) return _obj + + diff --git a/saturn_api/models/workspace_list.py b/saturn_api/models/workspace_list.py index 7f4c3d4..1c8c935 100644 --- a/saturn_api/models/workspace_list.py +++ b/saturn_api/models/workspace_list.py @@ -1,34 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.workspace import Workspace - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceList(BaseModel): """ WorkspaceList - """ # noqa: E501 - + """ # noqa: E501 workspaces: List[Workspace] = Field(description="List of workspaces.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -40,6 +38,7 @@ class WorkspaceList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,13 +66,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "workspaces", - "prev_key", - "next_key", - ] - ) + excluded_fields: Set[str] = set([ + "workspaces", + "prev_key", + "next_key", + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_workspaces in self.workspaces: if _item_workspaces: _items.append(_item_workspaces.to_dict()) - _dict["workspaces"] = _items + _dict['workspaces'] = _items return _dict @classmethod @@ -98,15 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "workspaces": ( - [Workspace.from_dict(_item) for _item in obj["workspaces"]] - if obj.get("workspaces") is not None - else None - ), - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key"), - } - ) + _obj = cls.model_validate({ + "workspaces": [Workspace.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None, + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key") + }) return _obj + + diff --git a/saturn_api/models/workspace_recipe.py b/saturn_api/models/workspace_recipe.py index 8ba8f05..becb926 100644 --- a/saturn_api/models/workspace_recipe.py +++ b/saturn_api/models/workspace_recipe.py @@ -1,45 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.resource_state import ResourceState from saturn_api.models.workspace_spec import WorkspaceSpec - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceRecipe(BaseModel): """ WorkspaceRecipe - """ # noqa: E501 - - schema_version: Optional[StrictStr] = "2025.10.01" - type: Literal["workspace"] + """ # noqa: E501 + schema_version: Optional[StrictStr] = '2025.10.01' + type: Literal['workspace'] spec: WorkspaceSpec state: Optional[ResourceState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator("type") + @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(["workspace"]): + if value not in set(['workspace']): raise ValueError("must be one of enum values ('workspace')") return value @@ -49,6 +47,7 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,11 +73,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "state", - ] - ) + excluded_fields: Set[str] = set([ + "state", + ]) _dict = self.model_dump( by_alias=True, @@ -87,10 +84,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict["spec"] = self.spec.to_dict() + _dict['spec'] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() return _dict @classmethod @@ -102,20 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "schema_version": ( - obj.get("schema_version") - if obj.get("schema_version") is not None - else "2025.10.01" - ), - "type": obj.get("type"), - "spec": ( - WorkspaceSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None - ), - "state": ( - ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None - ), - } - ) + _obj = cls.model_validate({ + "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', + "type": obj.get("type"), + "spec": WorkspaceSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "state": ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None + }) return _obj + + diff --git a/saturn_api/models/workspace_route_recipe.py b/saturn_api/models/workspace_route_recipe.py index edd801e..7309fa1 100644 --- a/saturn_api/models/workspace_route_recipe.py +++ b/saturn_api/models/workspace_route_recipe.py @@ -1,44 +1,44 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Annotated, Self - +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceRouteRecipe(BaseModel): """ WorkspaceRouteRecipe - """ # noqa: E501 - - subdomain: Optional[StrictStr] = "" + """ # noqa: E501 + subdomain: Optional[StrictStr] = '' container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] - visibility: Literal["org", "owner"] | None = None + visibility: Literal['org', 'owner'] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator("visibility") + @field_validator('visibility') def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["org", "owner"]): + if value not in set(['org', 'owner']): raise ValueError("must be one of enum values ('org', 'owner')") return value @@ -48,6 +48,7 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else "", - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility"), - } - ) + _obj = cls.model_validate({ + "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else '', + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility") + }) return _obj + + diff --git a/saturn_api/models/workspace_runtime_summary.py b/saturn_api/models/workspace_runtime_summary.py index 1a64ac7..97060ae 100644 --- a/saturn_api/models/workspace_runtime_summary.py +++ b/saturn_api/models/workspace_runtime_summary.py @@ -1,36 +1,34 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Set +import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.condition import Condition from saturn_api.models.deployment_status import DeploymentStatus - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceRuntimeSummary(BaseModel): """ WorkspaceRuntimeSummary - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr namespace: StrictStr uid: StrictStr @@ -46,23 +44,7 @@ class WorkspaceRuntimeSummary(BaseModel): running_count: StrictInt active_count: StrictInt disk_space: StrictStr - __properties: ClassVar[List[str]] = [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "status", - "scale", - "running_count", - "active_count", - "disk_space", - ] + __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "scale", "running_count", "active_count", "disk_space"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +52,7 @@ class WorkspaceRuntimeSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -108,24 +91,22 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "scale", - "running_count", - "active_count", - "disk_space", - ] - ) + excluded_fields: Set[str] = set([ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "scale", + "running_count", + "active_count", + "disk_space", + ]) _dict = self.model_dump( by_alias=True, @@ -138,26 +119,26 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict["conditions"] = _items + _dict['conditions'] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict["controller_uid"] = None + _dict['controller_uid'] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict["controller_kind"] = None + _dict['controller_kind'] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict["started_at"] = None + _dict['started_at'] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict["deleted_at"] = None + _dict['deleted_at'] = None return _dict @@ -170,27 +151,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": ( - [Condition.from_dict(_item) for _item in obj["conditions"]] - if obj.get("conditions") is not None - else None - ), - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "scale": obj.get("scale"), - "running_count": obj.get("running_count"), - "active_count": obj.get("active_count"), - "disk_space": obj.get("disk_space"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "scale": obj.get("scale"), + "running_count": obj.get("running_count"), + "active_count": obj.get("active_count"), + "disk_space": obj.get("disk_space") + }) return _obj + + diff --git a/saturn_api/models/workspace_server_info.py b/saturn_api/models/workspace_server_info.py index 39e4092..8431a32 100644 --- a/saturn_api/models/workspace_server_info.py +++ b/saturn_api/models/workspace_server_info.py @@ -1,39 +1,35 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.workspace_ide_default_images import WorkspaceIdeDefaultImages from saturn_api.models.workspace_server_options import WorkspaceServerOptions - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceServerInfo(BaseModel): """ WorkspaceServerInfo - """ # noqa: E501 - - server_options: WorkspaceServerOptions = Field( - description="Configuration options for workspaces." - ) + """ # noqa: E501 + server_options: WorkspaceServerOptions = Field(description="Configuration options for workspaces.") default_images: WorkspaceIdeDefaultImages = Field(description="Default images for workspaces.") default_sizes: DefaultSizes = Field(description="Default instance sizes for workspaces.") __properties: ClassVar[List[str]] = ["server_options", "default_images", "default_sizes"] @@ -44,6 +40,7 @@ class WorkspaceServerInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,13 +68,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "server_options", - "default_images", - "default_sizes", - ] - ) + excluded_fields: Set[str] = set([ + "server_options", + "default_images", + "default_sizes", + ]) _dict = self.model_dump( by_alias=True, @@ -86,13 +81,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict["server_options"] = self.server_options.to_dict() + _dict['server_options'] = self.server_options.to_dict() # override the default output from pydantic by calling `to_dict()` of default_images if self.default_images: - _dict["default_images"] = self.default_images.to_dict() + _dict['default_images'] = self.default_images.to_dict() # override the default output from pydantic by calling `to_dict()` of default_sizes if self.default_sizes: - _dict["default_sizes"] = self.default_sizes.to_dict() + _dict['default_sizes'] = self.default_sizes.to_dict() return _dict @classmethod @@ -104,23 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "server_options": ( - WorkspaceServerOptions.from_dict(obj["server_options"]) - if obj.get("server_options") is not None - else None - ), - "default_images": ( - WorkspaceIdeDefaultImages.from_dict(obj["default_images"]) - if obj.get("default_images") is not None - else None - ), - "default_sizes": ( - DefaultSizes.from_dict(obj["default_sizes"]) - if obj.get("default_sizes") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "server_options": WorkspaceServerOptions.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None, + "default_images": WorkspaceIdeDefaultImages.from_dict(obj["default_images"]) if obj.get("default_images") is not None else None, + "default_sizes": DefaultSizes.from_dict(obj["default_sizes"]) if obj.get("default_sizes") is not None else None + }) return _obj + + diff --git a/saturn_api/models/workspace_server_options.py b/saturn_api/models/workspace_server_options.py index 45c6633..5e33333 100644 --- a/saturn_api/models/workspace_server_options.py +++ b/saturn_api/models/workspace_server_options.py @@ -1,47 +1,43 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing_extensions import Self - +from typing import Any, ClassVar, Dict, List from saturn_api.models.instance_size import InstanceSize - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceServerOptions(BaseModel): """ WorkspaceServerOptions - """ # noqa: E501 - - auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] + """ # noqa: E501 + auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] disk_space: List[StrictStr] = Field(description="List of available disk space sizes.") size: List[InstanceSize] = Field(description="List of available instance sizes.") __properties: ClassVar[List[str]] = ["auto_shutoff", "disk_space", "size"] - @field_validator("auto_shutoff") + @field_validator('auto_shutoff') def auto_shutoff_validate_enum(cls, value): """Validates the enum""" for i in value: - if i not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): - raise ValueError( - "each list item must be one of ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" - ) + if i not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): + raise ValueError("each list item must be one of ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") return value model_config = ConfigDict( @@ -50,6 +46,7 @@ def auto_shutoff_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,13 +74,11 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set( - [ - "auto_shutoff", - "disk_space", - "size", - ] - ) + excluded_fields: Set[str] = set([ + "auto_shutoff", + "disk_space", + "size", + ]) _dict = self.model_dump( by_alias=True, @@ -96,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_size in self.size: if _item_size: _items.append(_item_size.to_dict()) - _dict["size"] = _items + _dict['size'] = _items return _dict @classmethod @@ -108,15 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "auto_shutoff": obj.get("auto_shutoff"), - "disk_space": obj.get("disk_space"), - "size": ( - [InstanceSize.from_dict(_item) for _item in obj["size"]] - if obj.get("size") is not None - else None - ), - } - ) + _obj = cls.model_validate({ + "auto_shutoff": obj.get("auto_shutoff"), + "disk_space": obj.get("disk_space"), + "size": [InstanceSize.from_dict(_item) for _item in obj["size"]] if obj.get("size") is not None else None + }) return _obj + + diff --git a/saturn_api/models/workspace_spec.py b/saturn_api/models/workspace_spec.py index 83f7648..d98a99d 100644 --- a/saturn_api/models/workspace_spec.py +++ b/saturn_api/models/workspace_spec.py @@ -1,53 +1,41 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictStr, - field_validator, -) -from typing_extensions import Annotated, Self +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment -from saturn_api.models.external_repo_attachment_recipe import ( - ExternalRepoAttachmentRecipe, -) +from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe from saturn_api.models.image_tag_reference import ImageTagReference from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe -from saturn_api.models.shared_folder_attachment_recipe import ( - SharedFolderAttachmentRecipe, -) +from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe from saturn_api.models.viewer_recipe import ViewerRecipe from saturn_api.models.workspace_route_recipe import WorkspaceRouteRecipe - +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceSpec(BaseModel): """ WorkspaceSpec - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr owner: Optional[OwnerReference] = None description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None @@ -64,73 +52,45 @@ class WorkspaceSpec(BaseModel): secrets: Optional[List[SecretAttachmentRecipe]] = None shared_folders: Optional[List[SharedFolderAttachmentRecipe]] = None start_dind: Optional[StrictBool] = None - status: Literal["stopped", "running"] | None = None - ide: Literal["jupyter", "rstudio"] = "jupyter" + status: Literal['stopped', 'running'] | None = None + ide: Literal['jupyter', 'rstudio'] = 'jupyter' disk_space: Optional[StrictStr] = None - auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] = "1 hour" + auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] = '1 hour' start_ssh: Optional[StrictBool] = False use_spot_instance: Optional[StrictBool] = False routes: Optional[List[WorkspaceRouteRecipe]] = None viewers: Optional[List[ViewerRecipe]] = None self_destruct: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = [ - "name", - "owner", - "description", - "tags", - "image", - "instance_type", - "environment_variables", - "working_directory", - "extra_packages", - "start_script", - "token_scope", - "dask_cluster", - "git_repositories", - "secrets", - "shared_folders", - "start_dind", - "status", - "ide", - "disk_space", - "auto_shutoff", - "start_ssh", - "use_spot_instance", - "routes", - "viewers", - "self_destruct", - ] - - @field_validator("status") + __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "image", "instance_type", "environment_variables", "working_directory", "extra_packages", "start_script", "token_scope", "dask_cluster", "git_repositories", "secrets", "shared_folders", "start_dind", "status", "ide", "disk_space", "auto_shutoff", "start_ssh", "use_spot_instance", "routes", "viewers", "self_destruct"] + + @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["stopped", "running"]): + if value not in set(['stopped', 'running']): raise ValueError("must be one of enum values ('stopped', 'running')") return value - @field_validator("ide") + @field_validator('ide') def ide_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["jupyter", "rstudio"]): + if value not in set(['jupyter', 'rstudio']): raise ValueError("must be one of enum values ('jupyter', 'rstudio')") return value - @field_validator("auto_shutoff") + @field_validator('auto_shutoff') def auto_shutoff_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): - raise ValueError( - "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" - ) + if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): + raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") return value model_config = ConfigDict( @@ -139,6 +99,7 @@ def auto_shutoff_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -163,7 +124,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -172,70 +134,70 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict["owner"] = self.owner.to_dict() + _dict['owner'] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict["image"] = self.image.to_dict() + _dict['image'] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict["dask_cluster"] = self.dask_cluster.to_dict() + _dict['dask_cluster'] = self.dask_cluster.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in git_repositories (list) _items = [] if self.git_repositories: for _item_git_repositories in self.git_repositories: if _item_git_repositories: _items.append(_item_git_repositories.to_dict()) - _dict["git_repositories"] = _items + _dict['git_repositories'] = _items # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) _items = [] if self.secrets: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict["secrets"] = _items + _dict['secrets'] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_folders (list) _items = [] if self.shared_folders: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict["shared_folders"] = _items + _dict['shared_folders'] = _items # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict["routes"] = _items + _dict['routes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in viewers (list) _items = [] if self.viewers: for _item_viewers in self.viewers: if _item_viewers: _items.append(_item_viewers.to_dict()) - _dict["viewers"] = _items + _dict['viewers'] = _items # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if token_scope (nullable) is None # and model_fields_set contains the field if self.token_scope is None and "token_scope" in self.model_fields_set: - _dict["token_scope"] = None + _dict['token_scope'] = None # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict["status"] = None + _dict['status'] = None return _dict @@ -248,81 +210,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "owner": ( - OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - ), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image": ( - ImageTagReference.from_dict(obj["image"]) - if obj.get("image") is not None - else None - ), - "instance_type": obj.get("instance_type"), - "environment_variables": obj.get("environment_variables"), - "working_directory": obj.get("working_directory"), - "extra_packages": ( - ExtraPackagesRecipe.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "token_scope": obj.get("token_scope"), - "dask_cluster": ( - DaskClusterAttachment.from_dict(obj["dask_cluster"]) - if obj.get("dask_cluster") is not None - else None - ), - "git_repositories": ( - [ - ExternalRepoAttachmentRecipe.from_dict(_item) - for _item in obj["git_repositories"] - ] - if obj.get("git_repositories") is not None - else None - ), - "secrets": ( - [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] - if obj.get("secrets") is not None - else None - ), - "shared_folders": ( - [ - SharedFolderAttachmentRecipe.from_dict(_item) - for _item in obj["shared_folders"] - ] - if obj.get("shared_folders") is not None - else None - ), - "start_dind": obj.get("start_dind"), - "status": obj.get("status"), - "ide": obj.get("ide") if obj.get("ide") is not None else "jupyter", - "disk_space": obj.get("disk_space"), - "auto_shutoff": ( - obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else "1 hour" - ), - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - "use_spot_instance": ( - obj.get("use_spot_instance") - if obj.get("use_spot_instance") is not None - else False - ), - "routes": ( - [WorkspaceRouteRecipe.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None - ), - "viewers": ( - [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] - if obj.get("viewers") is not None - else None - ), - "self_destruct": ( - obj.get("self_destruct") if obj.get("self_destruct") is not None else False - ), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "tags": obj.get("tags"), + "image": ImageTagReference.from_dict(obj["image"]) if obj.get("image") is not None else None, + "instance_type": obj.get("instance_type"), + "environment_variables": obj.get("environment_variables"), + "working_directory": obj.get("working_directory"), + "extra_packages": ExtraPackagesRecipe.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "token_scope": obj.get("token_scope"), + "dask_cluster": DaskClusterAttachment.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, + "git_repositories": [ExternalRepoAttachmentRecipe.from_dict(_item) for _item in obj["git_repositories"]] if obj.get("git_repositories") is not None else None, + "secrets": [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, + "shared_folders": [SharedFolderAttachmentRecipe.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, + "start_dind": obj.get("start_dind"), + "status": obj.get("status"), + "ide": obj.get("ide") if obj.get("ide") is not None else 'jupyter', + "disk_space": obj.get("disk_space"), + "auto_shutoff": obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else '1 hour', + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + "use_spot_instance": obj.get("use_spot_instance") if obj.get("use_spot_instance") is not None else False, + "routes": [WorkspaceRouteRecipe.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "viewers": [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] if obj.get("viewers") is not None else None, + "self_destruct": obj.get("self_destruct") if obj.get("self_destruct") is not None else False + }) return _obj + + diff --git a/saturn_api/models/workspace_start.py b/saturn_api/models/workspace_start.py index 4d03ff9..899f082 100644 --- a/saturn_api/models/workspace_start.py +++ b/saturn_api/models/workspace_start.py @@ -1,36 +1,32 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Optional, Set +import json from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Literal, Optional, Set from typing_extensions import Self - class WorkspaceStart(BaseModel): """ WorkspaceStart - """ # noqa: E501 - - debug_mode: Optional[StrictBool] = Field( - default=None, - description="Enable debug mode. Workspace will continue to run on error, and SSH will be enabled.", - ) + """ # noqa: E501 + debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Workspace will continue to run on error, and SSH will be enabled.") __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -39,6 +35,7 @@ class WorkspaceStart(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +60,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +79,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) + _obj = cls.model_validate({ + "debug_mode": obj.get("debug_mode") + }) return _obj + + diff --git a/saturn_api/models/workspace_update.py b/saturn_api/models/workspace_update.py index 195b87d..c9b3f2f 100644 --- a/saturn_api/models/workspace_update.py +++ b/saturn_api/models/workspace_update.py @@ -1,119 +1,62 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from __future__ import annotations -import json +from __future__ import annotations import pprint import re # noqa: F401 -from typing import Any, ClassVar, Dict, List, Literal, Optional, Set - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictStr, - field_validator, -) -from typing_extensions import Annotated, Self - -from saturn_api.models.external_repo_attachment_nested import ( - ExternalRepoAttachmentNested, -) -from saturn_api.models.extra_packages import ExtraPackages +import json +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from saturn_api.models.extra_packages import ExtraPackages +from typing import Literal, Optional, Set +from typing_extensions import Self class WorkspaceUpdate(BaseModel): """ WorkspaceUpdate - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="Name of the workspace.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( - default=None, description="Description of the workspace." - ) - tags: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Descriptive tags for the workspace." - ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the workspace.") + tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the workspace.") image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field( - default=True, description="Enable image trust validation before attaching." - ) - environment_variables: Optional[Dict[str, StrictStr]] = Field( - default=None, description="Mapping of environment variable keys to values." - ) - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( - default=None, description="List of external repo attachments." - ) - extra_packages: Optional[ExtraPackages] = Field( - default=None, description="Addtitional packages to install on start." - ) - start_script: Optional[StrictStr] = Field( - default=None, description="Shell script that runs on start before the primary command." - ) + image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") + environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments.") + extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") + start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") working_dir: Optional[StrictStr] = Field(default=None, description="Initial working directory.") - instance_size: Optional[StrictStr] = Field( - default=None, description="Instance size of the workspace." - ) - is_spot: Optional[StrictBool] = Field( - default=None, description="Enables running on spot instance sizes." - ) + instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the workspace.") + is_spot: Optional[StrictBool] = Field(default=None, description="Enables running on spot instance sizes.") start_dind: Optional[StrictBool] = Field(default=None, description="Enables docker-in-docker.") - disk_space: Optional[StrictStr] = Field( - default=None, description="Size of the persistent volume attached to the workspace." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="Subdomain of the workspace URL." - ) - auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] | None = ( - None - ) - start_ssh: Optional[StrictBool] = Field( - default=None, description="Enable SSH access on the deployment." - ) - __properties: ClassVar[List[str]] = [ - "name", - "description", - "tags", - "image_uri", - "image_tag_id", - "image_enforce_trusted", - "environment_variables", - "external_repo_attachments", - "extra_packages", - "start_script", - "working_dir", - "instance_size", - "is_spot", - "start_dind", - "disk_space", - "subdomain", - "auto_shutoff", - "start_ssh", - ] - - @field_validator("auto_shutoff") + disk_space: Optional[StrictStr] = Field(default=None, description="Size of the persistent volume attached to the workspace.") + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain of the workspace URL.") + auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] | None = None + start_ssh: Optional[StrictBool] = Field(default=None, description="Enable SSH access on the deployment.") + __properties: ClassVar[List[str]] = ["name", "description", "tags", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "instance_size", "is_spot", "start_dind", "disk_space", "subdomain", "auto_shutoff", "start_ssh"] + + @field_validator('auto_shutoff') def auto_shutoff_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): - raise ValueError( - "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" - ) + if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): + raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") return value model_config = ConfigDict( @@ -122,6 +65,7 @@ def auto_shutoff_validate_enum(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -146,7 +90,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -159,29 +104,29 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict["external_repo_attachments"] = _items + _dict['external_repo_attachments'] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict["extra_packages"] = self.extra_packages.to_dict() + _dict['extra_packages'] = self.extra_packages.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict["tags"] = None + _dict['tags'] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict["extra_packages"] = None + _dict['extra_packages'] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict["start_script"] = None + _dict['start_script'] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict["subdomain"] = None + _dict['subdomain'] = None return _dict @@ -194,41 +139,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": ( - obj.get("image_enforce_trusted") - if obj.get("image_enforce_trusted") is not None - else True - ), - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": ( - [ - ExternalRepoAttachmentNested.from_dict(_item) - for _item in obj["external_repo_attachments"] - ] - if obj.get("external_repo_attachments") is not None - else None - ), - "extra_packages": ( - ExtraPackages.from_dict(obj["extra_packages"]) - if obj.get("extra_packages") is not None - else None - ), - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir"), - "instance_size": obj.get("instance_size"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "disk_space": obj.get("disk_space"), - "subdomain": obj.get("subdomain"), - "auto_shutoff": obj.get("auto_shutoff"), - "start_ssh": obj.get("start_ssh"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, + "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir"), + "instance_size": obj.get("instance_size"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "disk_space": obj.get("disk_space"), + "subdomain": obj.get("subdomain"), + "auto_shutoff": obj.get("auto_shutoff"), + "start_ssh": obj.get("start_ssh") + }) return _obj + + diff --git a/saturn_api/rest.py b/saturn_api/rest.py index 8c746b8..d3b105a 100644 --- a/saturn_api/rest.py +++ b/saturn_api/rest.py @@ -1,21 +1,22 @@ # coding: utf-8 """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 + import io import json import re import ssl -from typing import Optional +from typing import Optional, Union import httpx @@ -23,7 +24,6 @@ RESTResponseType = httpx.Response - class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -37,12 +37,17 @@ async def read(self): self.data = await self.response.aread() return self.data + @property + def headers(self): + """Returns a CIMultiDictProxy of response headers.""" + return self.response.headers + def getheaders(self): - """Returns a CIMultiDictProxy of the response headers.""" + """Returns a CIMultiDictProxy of the response headers; use ``headers`` instead.""" return self.response.headers def getheader(self, name, default=None): - """Returns a given response header.""" + """Returns a given response header; use ``headers`` instead.""" return self.response.headers.get(name, default) @@ -76,8 +81,13 @@ async def close(self): await self.pool_manager.aclose() async def request( - self, method, url, headers=None, body=None, post_params=None, _request_timeout=None - ): + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None): """Execute request :param method: http request method @@ -93,31 +103,48 @@ async def request( (connection, read) timeouts. """ method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: - raise ApiValueError("body parameter cannot be used with post_params parameter.") + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) post_params = post_params or {} headers = headers or {} timeout = _request_timeout or 5 * 60 - if "Content-Type" not in headers: - headers["Content-Type"] = "application/json" + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' - args = {"method": method, "url": url, "timeout": timeout, "headers": headers} + args = { + "method": method, + "url": url, + "timeout": timeout, + "headers": headers + } # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - if re.search("json", headers["Content-Type"], re.IGNORECASE): + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if re.search('json', headers['Content-Type'], re.IGNORECASE): if body is not None: args["json"] = body - elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 + if body is None and post_params: + args["json"] = dict(post_params) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 args["data"] = dict(post_params) - elif headers["Content-Type"] == "multipart/form-data": + elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by httpx - del headers["Content-Type"] + del headers['Content-Type'] files = [] data = {} @@ -161,8 +188,14 @@ def _create_pool_manager(self) -> httpx.AsyncClient: proxy = None if self.proxy: - proxy = httpx.Proxy(url=self.proxy, headers=self.proxy_headers) + proxy = httpx.Proxy( + url=self.proxy, + headers=self.proxy_headers + ) return httpx.AsyncClient( - limits=limits, proxy=proxy, verify=self.ssl_context, trust_env=True + limits=limits, + proxy=proxy, + verify=self.ssl_context, + trust_env=True ) diff --git a/setup.py b/setup.py index 8ecdd9c..f53e66b 100644 --- a/setup.py +++ b/setup.py @@ -1,17 +1,16 @@ -# coding: utf-8 - """ -Saturn Cloud + Saturn Cloud -The API for Saturn Cloud. + The API for Saturn Cloud. -The version of the OpenAPI document: 2026.02.01 -Generated by OpenAPI Generator (https://openapi-generator.tech) + The version of the OpenAPI document: 2026.02.01 + Generated by OpenAPI Generator (https://openapi-generator.tech) -Do not edit the class manually. + Do not edit the class manually. """ # noqa: E501 -from setuptools import find_packages, setup # noqa: H301 + +from setuptools import setup, find_packages # noqa: H301 # To install the library, run the following # @@ -21,12 +20,11 @@ # http://pypi.python.org/pypi/setuptools NAME = "saturn-api" VERSION = "1.0.0" -PYTHON_REQUIRES = ">= 3.9" +PYTHON_REQUIRES = ">= 3.10" REQUIRES = [ - "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "httpx >= 0.28.1", - "pydantic >= 2", + "pydantic >= 2.11", "typing-extensions >= 4.7.1", ] @@ -36,12 +34,12 @@ description="Saturn Cloud", author="OpenAPI Generator community", author_email="team@openapitools.org", - url="https://github.com/saturncloud/saturn-api", + url="github.com/saturncloud/saturn-api", keywords=["OpenAPI", "OpenAPI-Generator", "Saturn Cloud"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description_content_type="text/markdown", + long_description_content_type='text/markdown', long_description="""\ The API for Saturn Cloud. """, # noqa: E501 From 06458f926e7188d903d586dedde98fd7b35571b2 Mon Sep 17 00:00:00 2001 From: hugo Date: Wed, 27 May 2026 16:53:42 -0700 Subject: [PATCH 2/4] tokenfactory --- .openapi-generator/FILES | 36 + README.md | 29 + client.yaml | 933 ++++ docs/Artifact.md | 37 + docs/ArtifactCreate.md | 34 + docs/ArtifactKind.md | 14 + docs/ArtifactList.md | 31 + docs/ArtifactStatus.md | 18 + docs/ArtifactUpdate.md | 30 + docs/ArtifactsApi.md | 423 ++ docs/ConfigFileEntry.md | 30 + docs/Dataset.md | 36 + docs/DatasetCreate.md | 30 + docs/DatasetList.md | 31 + docs/DatasetsApi.md | 420 ++ docs/Deployment.md | 1 + docs/DeploymentCreate.md | 1 + docs/DeploymentSpec.md | 1 + docs/DeploymentUpdate.md | 1 + docs/FineTuneJobCreate.md | 33 + docs/FineTuneJobList.md | 31 + docs/FineTuneJobView.md | 39 + docs/FineTuningJobsApi.md | 339 ++ docs/Hyperparameters.md | 34 + docs/Hyperparameters1.md | 34 + docs/Job.md | 1 + docs/JobCreate.md | 1 + docs/JobSpec.md | 1 + docs/JobUpdate.md | 1 + docs/Resource.md | 1 + docs/Workspace.md | 1 + docs/WorkspaceCreate.md | 1 + docs/WorkspaceSpec.md | 1 + docs/WorkspaceUpdate.md | 1 + saturn_api/__init__.py | 494 ++- saturn_api/api/__init__.py | 8 +- saturn_api/api/active_api.py | 653 ++- saturn_api/api/api_status_api.py | 99 +- saturn_api/api/api_tokens_api.py | 565 +-- saturn_api/api/artifacts_api.py | 1360 ++++++ saturn_api/api/authorization_api.py | 439 +- saturn_api/api/clusters_api.py | 536 +-- saturn_api/api/current_user_api.py | 820 ++-- saturn_api/api/dask_clusters_api.py | 2496 ++++------- saturn_api/api/datasets_api.py | 1336 ++++++ saturn_api/api/deployments_api.py | 3597 ++++++---------- .../api/external_repo_attachments_api.py | 548 +-- saturn_api/api/external_repos_api.py | 640 ++- saturn_api/api/fine_tuning_jobs_api.py | 1075 +++++ saturn_api/api/groups_api.py | 1010 ++--- saturn_api/api/image_tags_api.py | 1015 ++--- saturn_api/api/images_api.py | 712 ++- saturn_api/api/info_api.py | 182 +- saturn_api/api/invitations_api.py | 554 +-- saturn_api/api/jobs_api.py | 3314 +++++--------- saturn_api/api/limits_api.py | 548 +-- saturn_api/api/notifications_api.py | 683 ++- saturn_api/api/object_storage_api.py | 1740 ++++---- saturn_api/api/orgs_api.py | 2344 ++++------ saturn_api/api/recipes_api.py | 676 ++- saturn_api/api/secrets_api.py | 658 ++- .../api/service_account_entitlements_api.py | 496 +-- saturn_api/api/service_accounts_api.py | 521 +-- .../api/shared_folder_attachments_api.py | 548 +-- saturn_api/api/shared_folders_api.py | 661 ++- saturn_api/api/ssh_private_keys_api.py | 604 +-- saturn_api/api/ssh_public_keys_api.py | 586 +-- saturn_api/api/users_api.py | 572 +-- saturn_api/api/workspaces_api.py | 3830 ++++++----------- saturn_api/api_client.py | 296 +- saturn_api/api_response.py | 11 +- saturn_api/configuration.py | 131 +- saturn_api/exceptions.py | 44 +- saturn_api/models/__init__.py | 116 +- saturn_api/models/active_resource_list.py | 57 +- saturn_api/models/aggregated_usage.py | 32 +- saturn_api/models/api_status.py | 39 +- saturn_api/models/api_token.py | 107 +- saturn_api/models/api_token_create.py | 83 +- saturn_api/models/api_token_info.py | 95 +- saturn_api/models/api_token_list.py | 57 +- saturn_api/models/api_token_update.py | 38 +- saturn_api/models/app_info.py | 140 +- saturn_api/models/artifact.py | 144 + saturn_api/models/artifact_create.py | 126 + saturn_api/models/artifact_kind.py | 37 + saturn_api/models/artifact_list.py | 112 + saturn_api/models/artifact_status.py | 39 + saturn_api/models/artifact_update.py | 90 + saturn_api/models/auth0_info.py | 43 +- saturn_api/models/authorization_code_grant.py | 47 +- saturn_api/models/authorization_grant.py | 41 +- .../models/authorization_refresh_grant.py | 40 +- .../models/authorization_token_response.py | 75 +- saturn_api/models/build_data.py | 115 +- saturn_api/models/cluster.py | 88 +- saturn_api/models/cluster_connection_type.py | 19 +- saturn_api/models/cluster_create.py | 86 +- saturn_api/models/cluster_list.py | 57 +- saturn_api/models/cluster_update.py | 66 +- saturn_api/models/concurrency_policy.py | 21 +- saturn_api/models/condition.py | 79 +- saturn_api/models/config_file_entry.py | 90 + .../models/container_runtime_summary.py | 170 +- saturn_api/models/container_status.py | 25 +- saturn_api/models/cron_schedule.py | 47 +- saturn_api/models/cron_schedule_create.py | 37 +- saturn_api/models/cron_schedule_update.py | 41 +- saturn_api/models/daily_usage.py | 53 +- saturn_api/models/daily_usage_list.py | 44 +- saturn_api/models/dask_cluster.py | 220 +- saturn_api/models/dask_cluster_adapt.py | 43 +- saturn_api/models/dask_cluster_attachment.py | 69 +- .../dask_cluster_attachment_scheduler.py | 31 +- .../models/dask_cluster_attachment_worker.py | 52 +- saturn_api/models/dask_cluster_create.py | 102 +- saturn_api/models/dask_cluster_list.py | 57 +- saturn_api/models/dask_cluster_nested.py | 181 +- .../models/dask_cluster_runtime_summary.py | 149 +- saturn_api/models/dask_cluster_scale.py | 38 +- .../models/dask_cluster_server_options.py | 48 +- saturn_api/models/dask_cluster_update.py | 88 +- saturn_api/models/dask_components.py | 21 +- .../dask_worker_runtime_summary_list.py | 57 +- saturn_api/models/dask_worker_summary.py | 52 +- saturn_api/models/data_point.py | 39 +- saturn_api/models/dataset.py | 134 + saturn_api/models/dataset_create.py | 93 + saturn_api/models/dataset_list.py | 112 + saturn_api/models/default_images.py | 62 +- saturn_api/models/default_sizes.py | 62 +- saturn_api/models/deployment.py | 281 +- saturn_api/models/deployment_create.py | 235 +- saturn_api/models/deployment_list.py | 57 +- saturn_api/models/deployment_recipe.py | 69 +- saturn_api/models/deployment_route_recipe.py | 54 +- .../models/deployment_runtime_summary.py | 126 +- saturn_api/models/deployment_server_info.py | 60 +- saturn_api/models/deployment_spec.py | 225 +- saturn_api/models/deployment_start.py | 36 +- saturn_api/models/deployment_status.py | 25 +- saturn_api/models/deployment_update.py | 212 +- saturn_api/models/external_repo.py | 93 +- saturn_api/models/external_repo_attachment.py | 122 +- .../models/external_repo_attachment_create.py | 91 +- .../models/external_repo_attachment_list.py | 64 +- .../models/external_repo_attachment_nested.py | 75 +- .../models/external_repo_attachment_recipe.py | 72 +- .../models/external_repo_attachment_update.py | 63 +- saturn_api/models/external_repo_create.py | 52 +- saturn_api/models/external_repo_list.py | 57 +- saturn_api/models/external_repo_update.py | 40 +- saturn_api/models/extra_packages.py | 99 +- saturn_api/models/extra_packages_recipe.py | 84 +- .../models/extra_packages_recipe_apt.py | 31 +- .../models/extra_packages_recipe_conda.py | 39 +- .../models/extra_packages_recipe_pip.py | 34 +- saturn_api/models/fine_tune_job_create.py | 117 + saturn_api/models/fine_tune_job_list.py | 114 + saturn_api/models/fine_tune_job_view.py | 173 + saturn_api/models/group.py | 84 +- saturn_api/models/group_create.py | 70 +- saturn_api/models/group_list.py | 57 +- saturn_api/models/group_member.py | 52 +- saturn_api/models/group_member_create.py | 31 +- saturn_api/models/group_member_list.py | 57 +- saturn_api/models/group_update.py | 56 +- saturn_api/models/hardware_type.py | 21 +- saturn_api/models/historic_log.py | 52 +- saturn_api/models/historic_log_list.py | 57 +- saturn_api/models/hyperparameters.py | 118 + saturn_api/models/hyperparameters1.py | 116 + saturn_api/models/identity.py | 57 +- saturn_api/models/identity_by_group_id.py | 31 +- saturn_api/models/identity_by_user_id.py | 31 +- saturn_api/models/identity_reference.py | 43 +- saturn_api/models/identity_type.py | 19 +- saturn_api/models/image.py | 95 +- saturn_api/models/image_access_level.py | 21 +- saturn_api/models/image_build_status.py | 25 +- saturn_api/models/image_create.py | 65 +- saturn_api/models/image_list.py | 57 +- saturn_api/models/image_recipe.py | 67 +- saturn_api/models/image_spec.py | 88 +- saturn_api/models/image_state.py | 55 +- saturn_api/models/image_tag.py | 122 +- saturn_api/models/image_tag_by_id.py | 39 +- saturn_api/models/image_tag_by_name.py | 50 +- saturn_api/models/image_tag_by_uri.py | 48 +- saturn_api/models/image_tag_create.py | 41 +- saturn_api/models/image_tag_create_build.py | 61 +- .../models/image_tag_create_external.py | 45 +- saturn_api/models/image_tag_list.py | 57 +- saturn_api/models/image_tag_recipe.py | 51 +- saturn_api/models/image_tag_reference.py | 43 +- saturn_api/models/image_tag_state.py | 39 +- saturn_api/models/image_tag_update.py | 48 +- saturn_api/models/image_update.py | 56 +- saturn_api/models/instance_size.py | 102 +- saturn_api/models/invitation.py | 85 +- saturn_api/models/invitation_create.py | 47 +- saturn_api/models/invitation_list.py | 57 +- saturn_api/models/invitation_status.py | 21 +- saturn_api/models/invitation_update.py | 34 +- saturn_api/models/job.py | 273 +- saturn_api/models/job_create.py | 233 +- saturn_api/models/job_list.py | 57 +- saturn_api/models/job_recipe.py | 67 +- saturn_api/models/job_restart.py | 36 +- saturn_api/models/job_runtime_summary.py | 133 +- saturn_api/models/job_runtime_summary_list.py | 57 +- saturn_api/models/job_server_info.py | 60 +- saturn_api/models/job_spec.py | 221 +- saturn_api/models/job_start.py | 36 +- saturn_api/models/job_status.py | 27 +- saturn_api/models/job_update.py | 209 +- saturn_api/models/login.py | 34 +- saturn_api/models/metric_series.py | 63 +- saturn_api/models/metrics.py | 144 +- saturn_api/models/notification.py | 76 +- .../models/notification_acknowledged.py | 50 +- saturn_api/models/notification_delete.py | 38 +- saturn_api/models/notification_list.py | 57 +- saturn_api/models/notification_subscribe.py | 43 +- .../models/notification_subscription.py | 56 +- .../models/notification_subscription_list.py | 57 +- saturn_api/models/notification_unsubscribe.py | 32 +- .../object_storage_bulk_delete_results.py | 40 +- .../models/object_storage_bulk_download.py | 51 +- .../models/object_storage_bulk_reference.py | 49 +- .../models/object_storage_complete_part.py | 32 +- .../models/object_storage_completed_upload.py | 44 +- .../models/object_storage_copy_source.py | 41 +- .../models/object_storage_dir_details.py | 36 +- .../models/object_storage_file_details.py | 54 +- saturn_api/models/object_storage_list.py | 65 +- .../object_storage_presigned_download.py | 54 +- .../models/object_storage_presigned_part.py | 52 +- .../models/object_storage_presigned_upload.py | 57 +- saturn_api/models/object_storage_reference.py | 44 +- .../models/object_storage_shared_owner.py | 44 +- .../object_storage_shared_owner_list.py | 59 +- saturn_api/models/object_storage_upload.py | 88 +- .../models/object_storage_upload_create.py | 73 +- .../models/object_storage_upload_list.py | 49 +- .../models/object_storage_usage_stats.py | 86 +- saturn_api/models/org.py | 121 +- saturn_api/models/org_create.py | 66 +- saturn_api/models/org_invitation.py | 102 +- saturn_api/models/org_invitation_create.py | 47 +- saturn_api/models/org_invitation_list.py | 57 +- saturn_api/models/org_invitation_update.py | 34 +- saturn_api/models/org_list.py | 57 +- saturn_api/models/org_member_create.py | 49 +- saturn_api/models/org_member_update.py | 44 +- saturn_api/models/org_update.py | 64 +- .../models/orgs_list_owners200_response.py | 34 +- saturn_api/models/owner.py | 103 +- saturn_api/models/owner_by_id.py | 31 +- saturn_api/models/owner_by_identity_id.py | 45 +- saturn_api/models/owner_by_name.py | 31 +- saturn_api/models/owner_detailed.py | 156 +- saturn_api/models/owner_detailed_list.py | 57 +- saturn_api/models/owner_list.py | 57 +- saturn_api/models/owner_reference.py | 44 +- saturn_api/models/owner_usage.py | 46 +- saturn_api/models/owner_usage_list.py | 48 +- saturn_api/models/owner_user_detailed.py | 136 +- saturn_api/models/pod_history.py | 72 +- saturn_api/models/pod_logs.py | 36 +- saturn_api/models/pod_runtime_summary.py | 168 +- saturn_api/models/pod_runtime_summary_list.py | 57 +- saturn_api/models/pod_status.py | 29 +- saturn_api/models/recipe.py | 43 +- saturn_api/models/recipe_list.py | 57 +- saturn_api/models/resource.py | 43 +- .../models/resource_by_deployment_id.py | 31 +- saturn_api/models/resource_by_job_id.py | 31 +- saturn_api/models/resource_by_workspace_id.py | 31 +- saturn_api/models/resource_clusters.py | 40 +- saturn_api/models/resource_history.py | 49 +- saturn_api/models/resource_recipe.py | 42 +- saturn_api/models/resource_reference.py | 48 +- saturn_api/models/resource_state.py | 105 +- saturn_api/models/resource_template.py | 112 +- .../models/resource_template_access_level.py | 21 +- saturn_api/models/resource_token_info.py | 34 +- saturn_api/models/resource_token_update.py | 33 +- saturn_api/models/resource_type.py | 23 +- saturn_api/models/restart_policy.py | 21 +- saturn_api/models/route.py | 96 +- saturn_api/models/route_by_container_port.py | 34 +- saturn_api/models/route_by_id.py | 31 +- saturn_api/models/route_by_subdomain.py | 31 +- saturn_api/models/route_create.py | 56 +- saturn_api/models/route_list.py | 57 +- saturn_api/models/route_reference.py | 43 +- saturn_api/models/route_state.py | 48 +- saturn_api/models/route_update.py | 56 +- saturn_api/models/secret.py | 67 +- saturn_api/models/secret_access_level.py | 19 +- saturn_api/models/secret_attachment.py | 80 +- saturn_api/models/secret_attachment_create.py | 80 +- saturn_api/models/secret_attachment_list.py | 57 +- saturn_api/models/secret_attachment_recipe.py | 61 +- saturn_api/models/secret_attachment_type.py | 19 +- saturn_api/models/secret_attachment_update.py | 80 +- saturn_api/models/secret_create.py | 48 +- saturn_api/models/secret_list.py | 57 +- saturn_api/models/secret_update.py | 38 +- saturn_api/models/server_options.py | 70 +- saturn_api/models/server_options_size.py | 49 +- saturn_api/models/service_account.py | 66 +- .../models/service_account_attachment.py | 53 +- saturn_api/models/service_account_create.py | 59 +- .../service_account_create_attachment.py | 35 +- .../models/service_account_entitlement.py | 77 +- .../service_account_entitlement_create.py | 54 +- .../service_account_entitlement_list.py | 64 +- saturn_api/models/service_account_list.py | 57 +- saturn_api/models/service_account_update.py | 45 +- saturn_api/models/shared_access_mode.py | 19 +- saturn_api/models/shared_folder.py | 84 +- .../models/shared_folder_access_level.py | 19 +- saturn_api/models/shared_folder_attachment.py | 77 +- .../models/shared_folder_attachment_create.py | 52 +- .../models/shared_folder_attachment_list.py | 64 +- .../models/shared_folder_attachment_recipe.py | 46 +- .../models/shared_folder_attachment_update.py | 35 +- saturn_api/models/shared_folder_create.py | 56 +- saturn_api/models/shared_folder_list.py | 57 +- saturn_api/models/shared_folder_update.py | 35 +- saturn_api/models/ssh_private_key.py | 91 +- saturn_api/models/ssh_private_key_create.py | 65 +- saturn_api/models/ssh_private_key_list.py | 57 +- saturn_api/models/ssh_private_key_partial.py | 80 +- saturn_api/models/ssh_private_key_update.py | 52 +- saturn_api/models/ssh_public_key.py | 59 +- saturn_api/models/ssh_public_key_create.py | 52 +- saturn_api/models/ssh_public_key_list.py | 57 +- saturn_api/models/ssh_public_key_update.py | 32 +- saturn_api/models/stats.py | 52 +- saturn_api/models/usage_limits.py | 179 +- saturn_api/models/usage_limits_create.py | 155 +- saturn_api/models/usage_limits_list.py | 57 +- saturn_api/models/usage_limits_update.py | 148 +- saturn_api/models/usage_owner.py | 54 +- saturn_api/models/user.py | 48 +- saturn_api/models/user_admin_create.py | 84 +- saturn_api/models/user_detailed.py | 94 +- saturn_api/models/user_detailed_list.py | 57 +- saturn_api/models/user_list.py | 53 +- saturn_api/models/user_owner_list.py | 57 +- saturn_api/models/user_preferences.py | 53 +- saturn_api/models/user_preferences_update.py | 31 +- saturn_api/models/user_update.py | 75 +- saturn_api/models/users_get200_response.py | 34 +- saturn_api/models/users_list200_response.py | 34 +- saturn_api/models/viewer.py | 71 +- saturn_api/models/viewer_create.py | 53 +- saturn_api/models/viewer_list.py | 57 +- saturn_api/models/viewer_recipe.py | 44 +- .../models/white_label_configuration.py | 104 +- saturn_api/models/workload_type.py | 25 +- saturn_api/models/workspace.py | 294 +- saturn_api/models/workspace_create.py | 262 +- .../models/workspace_ide_default_images.py | 59 +- saturn_api/models/workspace_list.py | 57 +- saturn_api/models/workspace_recipe.py | 69 +- saturn_api/models/workspace_route_recipe.py | 50 +- .../models/workspace_runtime_summary.py | 131 +- saturn_api/models/workspace_server_info.py | 73 +- saturn_api/models/workspace_server_options.py | 67 +- saturn_api/models/workspace_spec.py | 255 +- saturn_api/models/workspace_start.py | 36 +- saturn_api/models/workspace_update.py | 220 +- saturn_api/rest.py | 68 +- setup.py | 15 +- 378 files changed, 31878 insertions(+), 28439 deletions(-) create mode 100644 docs/Artifact.md create mode 100644 docs/ArtifactCreate.md create mode 100644 docs/ArtifactKind.md create mode 100644 docs/ArtifactList.md create mode 100644 docs/ArtifactStatus.md create mode 100644 docs/ArtifactUpdate.md create mode 100644 docs/ArtifactsApi.md create mode 100644 docs/ConfigFileEntry.md create mode 100644 docs/Dataset.md create mode 100644 docs/DatasetCreate.md create mode 100644 docs/DatasetList.md create mode 100644 docs/DatasetsApi.md create mode 100644 docs/FineTuneJobCreate.md create mode 100644 docs/FineTuneJobList.md create mode 100644 docs/FineTuneJobView.md create mode 100644 docs/FineTuningJobsApi.md create mode 100644 docs/Hyperparameters.md create mode 100644 docs/Hyperparameters1.md create mode 100644 saturn_api/api/artifacts_api.py create mode 100644 saturn_api/api/datasets_api.py create mode 100644 saturn_api/api/fine_tuning_jobs_api.py create mode 100644 saturn_api/models/artifact.py create mode 100644 saturn_api/models/artifact_create.py create mode 100644 saturn_api/models/artifact_kind.py create mode 100644 saturn_api/models/artifact_list.py create mode 100644 saturn_api/models/artifact_status.py create mode 100644 saturn_api/models/artifact_update.py create mode 100644 saturn_api/models/config_file_entry.py create mode 100644 saturn_api/models/dataset.py create mode 100644 saturn_api/models/dataset_create.py create mode 100644 saturn_api/models/dataset_list.py create mode 100644 saturn_api/models/fine_tune_job_create.py create mode 100644 saturn_api/models/fine_tune_job_list.py create mode 100644 saturn_api/models/fine_tune_job_view.py create mode 100644 saturn_api/models/hyperparameters.py create mode 100644 saturn_api/models/hyperparameters1.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0b9c233..aa0a0ac 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -12,6 +12,13 @@ docs/ApiTokenList.md docs/ApiTokenUpdate.md docs/ApiTokensApi.md docs/AppInfo.md +docs/Artifact.md +docs/ArtifactCreate.md +docs/ArtifactKind.md +docs/ArtifactList.md +docs/ArtifactStatus.md +docs/ArtifactUpdate.md +docs/ArtifactsApi.md docs/Auth0Info.md docs/AuthorizationApi.md docs/AuthorizationCodeGrant.md @@ -27,6 +34,7 @@ docs/ClusterUpdate.md docs/ClustersApi.md docs/ConcurrencyPolicy.md docs/Condition.md +docs/ConfigFileEntry.md docs/ContainerRuntimeSummary.md docs/ContainerStatus.md docs/CronSchedule.md @@ -52,6 +60,10 @@ docs/DaskComponents.md docs/DaskWorkerRuntimeSummaryList.md docs/DaskWorkerSummary.md docs/DataPoint.md +docs/Dataset.md +docs/DatasetCreate.md +docs/DatasetList.md +docs/DatasetsApi.md docs/DefaultImages.md docs/DefaultSizes.md docs/Deployment.md @@ -83,6 +95,10 @@ docs/ExtraPackagesRecipe.md docs/ExtraPackagesRecipeApt.md docs/ExtraPackagesRecipeConda.md docs/ExtraPackagesRecipePip.md +docs/FineTuneJobCreate.md +docs/FineTuneJobList.md +docs/FineTuneJobView.md +docs/FineTuningJobsApi.md docs/Group.md docs/GroupCreate.md docs/GroupList.md @@ -94,6 +110,8 @@ docs/GroupsApi.md docs/HardwareType.md docs/HistoricLog.md docs/HistoricLogList.md +docs/Hyperparameters.md +docs/Hyperparameters1.md docs/Identity.md docs/IdentityByGroupId.md docs/IdentityByUserId.md @@ -323,13 +341,16 @@ saturn_api/api/__init__.py saturn_api/api/active_api.py saturn_api/api/api_status_api.py saturn_api/api/api_tokens_api.py +saturn_api/api/artifacts_api.py saturn_api/api/authorization_api.py saturn_api/api/clusters_api.py saturn_api/api/current_user_api.py saturn_api/api/dask_clusters_api.py +saturn_api/api/datasets_api.py saturn_api/api/deployments_api.py saturn_api/api/external_repo_attachments_api.py saturn_api/api/external_repos_api.py +saturn_api/api/fine_tuning_jobs_api.py saturn_api/api/groups_api.py saturn_api/api/image_tags_api.py saturn_api/api/images_api.py @@ -364,6 +385,12 @@ saturn_api/models/api_token_info.py saturn_api/models/api_token_list.py saturn_api/models/api_token_update.py saturn_api/models/app_info.py +saturn_api/models/artifact.py +saturn_api/models/artifact_create.py +saturn_api/models/artifact_kind.py +saturn_api/models/artifact_list.py +saturn_api/models/artifact_status.py +saturn_api/models/artifact_update.py saturn_api/models/auth0_info.py saturn_api/models/authorization_code_grant.py saturn_api/models/authorization_grant.py @@ -377,6 +404,7 @@ saturn_api/models/cluster_list.py saturn_api/models/cluster_update.py saturn_api/models/concurrency_policy.py saturn_api/models/condition.py +saturn_api/models/config_file_entry.py saturn_api/models/container_runtime_summary.py saturn_api/models/container_status.py saturn_api/models/cron_schedule.py @@ -400,6 +428,9 @@ saturn_api/models/dask_components.py saturn_api/models/dask_worker_runtime_summary_list.py saturn_api/models/dask_worker_summary.py saturn_api/models/data_point.py +saturn_api/models/dataset.py +saturn_api/models/dataset_create.py +saturn_api/models/dataset_list.py saturn_api/models/default_images.py saturn_api/models/default_sizes.py saturn_api/models/deployment.py @@ -428,6 +459,9 @@ saturn_api/models/extra_packages_recipe.py saturn_api/models/extra_packages_recipe_apt.py saturn_api/models/extra_packages_recipe_conda.py saturn_api/models/extra_packages_recipe_pip.py +saturn_api/models/fine_tune_job_create.py +saturn_api/models/fine_tune_job_list.py +saturn_api/models/fine_tune_job_view.py saturn_api/models/group.py saturn_api/models/group_create.py saturn_api/models/group_list.py @@ -438,6 +472,8 @@ saturn_api/models/group_update.py saturn_api/models/hardware_type.py saturn_api/models/historic_log.py saturn_api/models/historic_log_list.py +saturn_api/models/hyperparameters.py +saturn_api/models/hyperparameters1.py saturn_api/models/identity.py saturn_api/models/identity_by_group_id.py saturn_api/models/identity_by_user_id.py diff --git a/README.md b/README.md index 0460084..88af54c 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,11 @@ Class | Method | HTTP request | Description *ApiTokensApi* | [**get**](docs/ApiTokensApi.md#get) | **GET** /api/tokens/{api_token_id} | Get api token *ApiTokensApi* | [**list**](docs/ApiTokensApi.md#list) | **GET** /api/tokens | List api tokens *ApiTokensApi* | [**update**](docs/ApiTokensApi.md#update) | **PATCH** /api/tokens/{api_token_id} | Update api token +*ArtifactsApi* | [**create**](docs/ArtifactsApi.md#create) | **POST** /api/orgs/{org_id}/artifacts | Create artifact +*ArtifactsApi* | [**delete**](docs/ArtifactsApi.md#delete) | **DELETE** /api/orgs/{org_id}/artifacts/{artifact_id} | Delete artifact +*ArtifactsApi* | [**get**](docs/ArtifactsApi.md#get) | **GET** /api/orgs/{org_id}/artifacts/{artifact_id} | Get artifact +*ArtifactsApi* | [**list**](docs/ArtifactsApi.md#list) | **GET** /api/orgs/{org_id}/artifacts | List artifacts +*ArtifactsApi* | [**update**](docs/ArtifactsApi.md#update) | **PATCH** /api/orgs/{org_id}/artifacts/{artifact_id} | Update artifact *AuthorizationApi* | [**create_oauth_token**](docs/AuthorizationApi.md#create_oauth_token) | **POST** /api/auth/token | Create OAuth token *AuthorizationApi* | [**get_oauth_init**](docs/AuthorizationApi.md#get_oauth_init) | **GET** /api/auth/token | Initialize oauth *AuthorizationApi* | [**login**](docs/AuthorizationApi.md#login) | **POST** /api/auth/login | Login @@ -146,6 +151,11 @@ Class | Method | HTTP request | Description *DaskClustersApi* | [**stop**](docs/DaskClustersApi.md#stop) | **POST** /api/dask_clusters/{dask_cluster_id}/stop | Stop dask cluster *DaskClustersApi* | [**update**](docs/DaskClustersApi.md#update) | **PATCH** /api/dask_clusters/{dask_cluster_id} | Update dask cluster *DaskClustersApi* | [**update_token**](docs/DaskClustersApi.md#update_token) | **PATCH** /api/dask_clusters/{dask_cluster_id}/token | Update dask cluster API token +*DatasetsApi* | [**create**](docs/DatasetsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/datasets | Create dataset +*DatasetsApi* | [**delete**](docs/DatasetsApi.md#delete) | **DELETE** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Delete dataset +*DatasetsApi* | [**get**](docs/DatasetsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Get dataset +*DatasetsApi* | [**list**](docs/DatasetsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/datasets | List datasets +*DatasetsApi* | [**seal**](docs/DatasetsApi.md#seal) | **POST** /api/orgs/{org_id}/token-factory/datasets/{dataset_id}/seal | Seal dataset *DeploymentsApi* | [**create**](docs/DeploymentsApi.md#create) | **POST** /api/deployments | Create deployment *DeploymentsApi* | [**create_resource_template**](docs/DeploymentsApi.md#create_resource_template) | **POST** /api/deployments/{deployment_id}/template | Create deployment resource template *DeploymentsApi* | [**create_route**](docs/DeploymentsApi.md#create_route) | **POST** /api/deployments/{deployment_id}/routes | Create deployment route @@ -190,6 +200,10 @@ Class | Method | HTTP request | Description *ExternalReposApi* | [**get**](docs/ExternalReposApi.md#get) | **GET** /api/external_repos/{external_repo_id} | Get external repo *ExternalReposApi* | [**list**](docs/ExternalReposApi.md#list) | **GET** /api/external_repos | List external repos *ExternalReposApi* | [**update**](docs/ExternalReposApi.md#update) | **PATCH** /api/external_repos/{external_repo_id} | Update external repo +*FineTuningJobsApi* | [**create**](docs/FineTuningJobsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | Create fine-tuning job +*FineTuningJobsApi* | [**get**](docs/FineTuningJobsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id} | Get fine-tuning job +*FineTuningJobsApi* | [**jobs_cancel**](docs/FineTuningJobsApi.md#jobs_cancel) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel | Cancel fine-tuning job +*FineTuningJobsApi* | [**list**](docs/FineTuningJobsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | List fine-tuning jobs *GroupsApi* | [**create**](docs/GroupsApi.md#create) | **POST** /api/groups | Create group *GroupsApi* | [**create_member**](docs/GroupsApi.md#create_member) | **POST** /api/groups/{group_id}/members | Create group member *GroupsApi* | [**delete**](docs/GroupsApi.md#delete) | **DELETE** /api/groups/{group_id} | Delete group @@ -390,6 +404,12 @@ Class | Method | HTTP request | Description - [ApiTokenList](docs/ApiTokenList.md) - [ApiTokenUpdate](docs/ApiTokenUpdate.md) - [AppInfo](docs/AppInfo.md) + - [Artifact](docs/Artifact.md) + - [ArtifactCreate](docs/ArtifactCreate.md) + - [ArtifactKind](docs/ArtifactKind.md) + - [ArtifactList](docs/ArtifactList.md) + - [ArtifactStatus](docs/ArtifactStatus.md) + - [ArtifactUpdate](docs/ArtifactUpdate.md) - [Auth0Info](docs/Auth0Info.md) - [AuthorizationCodeGrant](docs/AuthorizationCodeGrant.md) - [AuthorizationGrant](docs/AuthorizationGrant.md) @@ -403,6 +423,7 @@ Class | Method | HTTP request | Description - [ClusterUpdate](docs/ClusterUpdate.md) - [ConcurrencyPolicy](docs/ConcurrencyPolicy.md) - [Condition](docs/Condition.md) + - [ConfigFileEntry](docs/ConfigFileEntry.md) - [ContainerRuntimeSummary](docs/ContainerRuntimeSummary.md) - [ContainerStatus](docs/ContainerStatus.md) - [CronSchedule](docs/CronSchedule.md) @@ -426,6 +447,9 @@ Class | Method | HTTP request | Description - [DaskWorkerRuntimeSummaryList](docs/DaskWorkerRuntimeSummaryList.md) - [DaskWorkerSummary](docs/DaskWorkerSummary.md) - [DataPoint](docs/DataPoint.md) + - [Dataset](docs/Dataset.md) + - [DatasetCreate](docs/DatasetCreate.md) + - [DatasetList](docs/DatasetList.md) - [DefaultImages](docs/DefaultImages.md) - [DefaultSizes](docs/DefaultSizes.md) - [Deployment](docs/Deployment.md) @@ -454,6 +478,9 @@ Class | Method | HTTP request | Description - [ExtraPackagesRecipeApt](docs/ExtraPackagesRecipeApt.md) - [ExtraPackagesRecipeConda](docs/ExtraPackagesRecipeConda.md) - [ExtraPackagesRecipePip](docs/ExtraPackagesRecipePip.md) + - [FineTuneJobCreate](docs/FineTuneJobCreate.md) + - [FineTuneJobList](docs/FineTuneJobList.md) + - [FineTuneJobView](docs/FineTuneJobView.md) - [Group](docs/Group.md) - [GroupCreate](docs/GroupCreate.md) - [GroupList](docs/GroupList.md) @@ -464,6 +491,8 @@ Class | Method | HTTP request | Description - [HardwareType](docs/HardwareType.md) - [HistoricLog](docs/HistoricLog.md) - [HistoricLogList](docs/HistoricLogList.md) + - [Hyperparameters](docs/Hyperparameters.md) + - [Hyperparameters1](docs/Hyperparameters1.md) - [Identity](docs/Identity.md) - [IdentityByGroupId](docs/IdentityByGroupId.md) - [IdentityByUserId](docs/IdentityByUserId.md) diff --git a/client.yaml b/client.yaml index 2d58b9f..29550d3 100644 --- a/client.yaml +++ b/client.yaml @@ -5115,6 +5115,160 @@ paths: schema: $ref: '#/components/schemas/Org' description: Updated + /api/orgs/{org_id}/artifacts: + get: + summary: List artifacts + description: Paginated list of artifacts. + operationId: artifacts_list + tags: + - artifacts + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - in: query + name: kind + description: Filter artifacts by kind. + schema: + $ref: '#/components/schemas/ArtifactKind' + required: false + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Page size. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + - in: query + name: descending + description: List results in descending order. + schema: + type: boolean + default: false + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactList' + description: Ok + post: + summary: Create artifact + description: Create a new artifact. + operationId: artifacts_create + tags: + - artifacts + parameters: + - name: org_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactCreate' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Artifact' + description: Created + /api/orgs/{org_id}/artifacts/{artifact_id}: + delete: + summary: Delete artifact + description: Delete an artifact. + operationId: artifacts_delete + tags: + - artifacts + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: artifact_id + in: path + schema: + type: string + required: true + responses: + '204': + description: Deleted + get: + summary: Get artifact + description: Get an artifact. + operationId: artifacts_get + tags: + - artifacts + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: artifact_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Artifact' + description: Ok + patch: + summary: Update artifact + description: Update an artifact. + operationId: artifacts_update + tags: + - artifacts + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: artifact_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactUpdate' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Artifact' + description: Updated /api/orgs/{org_id}/invitations: get: summary: List org invitations @@ -5514,6 +5668,278 @@ paths: - $ref: '#/components/schemas/OwnerList' - $ref: '#/components/schemas/OwnerDetailedList' description: Ok + /api/orgs/{org_id}/token-factory/datasets: + get: + summary: List datasets + description: Paginated list of datasets. + operationId: datasets_list + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - in: query + name: status + description: Filter datasets by status. + schema: + $ref: '#/components/schemas/ArtifactStatus' + required: false + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Page size. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + - in: query + name: descending + description: List results in descending order. + schema: + type: boolean + default: false + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetList' + description: Ok + post: + summary: Create dataset + description: Create a new dataset. + operationId: datasets_create + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreate' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + description: Created + /api/orgs/{org_id}/token-factory/datasets/{dataset_id}: + delete: + summary: Delete dataset + description: Delete a dataset. + operationId: datasets_delete + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: dataset_id + in: path + schema: + type: string + required: true + responses: + '204': + description: Deleted + get: + summary: Get dataset + description: Get a dataset. + operationId: datasets_get + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: dataset_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + description: Ok + /api/orgs/{org_id}/token-factory/datasets/{dataset_id}/seal: + post: + summary: Seal dataset + description: Transition a dataset from `assembling` to `ready`, making it immutable. + operationId: datasets_seal + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: dataset_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + description: Sealed + /api/orgs/{org_id}/token-factory/fine-tuning/jobs: + get: + summary: List fine-tuning jobs + description: Paginated list of fine-tuning jobs. + operationId: fine-tuningjobs_list + tags: + - fine_tuning_jobs + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Page size. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + - in: query + name: descending + description: List results in descending order. + schema: + type: boolean + default: false + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuneJobList' + description: Ok + post: + summary: Create fine-tuning job + description: Create a new fine-tuning job. + operationId: fine-tuningjobs_create + tags: + - fine_tuning_jobs + parameters: + - name: org_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuneJobCreate' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuneJobView' + description: Created + /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}: + get: + summary: Get fine-tuning job + description: Get a fine-tuning job. + operationId: fine-tuningjobs_get + tags: + - fine_tuning_jobs + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: job_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuneJobView' + description: Ok + /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel: + post: + summary: Cancel fine-tuning job + description: Stop the underlying intermittent deployment. + operationId: finetune_jobs_cancel + tags: + - fine-tuning jobs + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: job_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuneJobView' + description: Cancelled /api/orgs/{org_id}/usage/aggregated: get: summary: Get org usage @@ -8591,6 +9017,18 @@ components: properties: install: type: string + ConfigFileEntry: + type: object + properties: + content: + type: string + description: Content of the config file. + mode: + type: string + default: '0644' + description: File mode as a 4-character octal string, e.g. '0644'. + required: + - content DaskClusterAttachment: type: object properties: @@ -8776,6 +9214,11 @@ components: type: string extra_packages: $ref: '#/components/schemas/ExtraPackagesRecipe' + config_files: + type: object + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string nullable: true @@ -8930,6 +9373,11 @@ components: type: string extra_packages: $ref: '#/components/schemas/ExtraPackagesRecipe' + config_files: + type: object + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string nullable: true @@ -9050,6 +9498,11 @@ components: type: string extra_packages: $ref: '#/components/schemas/ExtraPackagesRecipe' + config_files: + type: object + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string nullable: true @@ -9839,6 +10292,15 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + readOnly: true + description: User-defined config files written to $HOME at pod startup. + additionalProperties: + type: object + additionalProperties: + type: string + nullable: true scale: type: integer readOnly: true @@ -10028,6 +10490,15 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + readOnly: true + description: User-defined config files written to $HOME at pod startup. + additionalProperties: + type: object + additionalProperties: + type: string + nullable: true cron_schedule_options: readOnly: true description: Cron schedule configuration for scheduled jobs. @@ -10182,6 +10653,15 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + readOnly: true + description: User-defined config files written to $HOME at pod startup. + additionalProperties: + type: object + additionalProperties: + type: string + nullable: true ide: type: string readOnly: true @@ -11629,6 +12109,14 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + default: null + description: User-defined config files written to $HOME at pod startup. + Keys are relative paths; values contain content and mode. + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string default: null @@ -11713,6 +12201,14 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + default: null + description: User-defined config files written to $HOME at pod startup. + Keys are relative paths; values contain content and mode. + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string default: null @@ -13431,6 +13927,14 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + default: null + description: User-defined config files written to $HOME at pod startup. + Keys are relative paths; values contain content and mode. + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string default: null @@ -13524,6 +14028,14 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + default: null + description: User-defined config files written to $HOME at pod startup. + Keys are relative paths; values contain content and mode. + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string default: null @@ -14571,6 +15083,144 @@ components: locked: type: boolean description: Lock the org. (Admin only) + ArtifactKind: + type: string + enum: + - dataset + - checkpoint + - model-weights + ArtifactStatus: + type: string + enum: + - assembling + - pending + - ready + - error + - deleted + Artifact: + type: object + properties: + id: + type: string + readOnly: true + description: Artifact identifier. + org_id: + type: string + readOnly: true + description: Owning organisation ID. + name: + type: string + readOnly: true + description: Human-readable artifact name. + kind: + readOnly: true + description: 'Artifact kind: dataset, checkpoint, or model-weights.' + $ref: '#/components/schemas/ArtifactKind' + location: + type: string + readOnly: true + description: Storage location (NFS path or object storage URI). + producer: + type: object + readOnly: true + description: 'JSONB snapshot of the producer resource: {id, kind, name}. + Null if artifact was uploaded directly.' + nullable: true + additionalProperties: {} + metadata: + type: object + readOnly: true + description: Arbitrary metadata blob. + nullable: true + additionalProperties: {} + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + description: Creation timestamp (UTC). + status: + readOnly: true + description: 'Artifact status: pending, ready, or error.' + $ref: '#/components/schemas/ArtifactStatus' + required: + - created_at + - id + - kind + - location + - metadata + - name + - org_id + - producer + - status + ArtifactList: + type: object + properties: + artifacts: + type: array + readOnly: true + description: List of artifacts. + items: + $ref: '#/components/schemas/Artifact' + prev_key: + type: string + readOnly: true + description: Previous page key. + next_key: + type: string + readOnly: true + description: Next page key. + required: + - artifacts + ArtifactCreate: + type: object + properties: + name: + type: string + minLength: 1 + description: Human-readable name for the artifact. + kind: + description: 'Artifact type: dataset, checkpoint, or model-weights.' + $ref: '#/components/schemas/ArtifactKind' + location: + type: string + minLength: 1 + description: Storage location (NFS path or object storage URI). + status: + description: "Initial artifact status. Defaults to 'pending'. Producers\ + \ that finish their work before calling create (e.g. a training job registering\ + \ a finished checkpoint) may set this to 'ready' or 'error' directly,\ + \ avoiding a separate PATCH. 'deleted' is rejected \u2014 soft-delete\ + \ goes through DELETE." + $ref: '#/components/schemas/ArtifactStatus' + producer: + type: object + default: null + description: 'JSONB snapshot of the Saturn resource that produced this artifact. + Shape: {id, kind, name}. Null if uploaded directly.' + nullable: true + additionalProperties: {} + metadata: + type: object + default: null + description: 'Arbitrary metadata blob: schema_type, row_count, base_model, + epoch, metrics, etc.' + nullable: true + additionalProperties: {} + required: + - location + - name + ArtifactUpdate: + type: object + properties: + status: + description: New artifact status. + $ref: '#/components/schemas/ArtifactStatus' + metadata: + type: object + default: null + description: Updated metadata blob. + nullable: true + additionalProperties: {} OrgInvitation: type: object properties: @@ -14973,6 +15623,273 @@ components: description: Next page key. required: - owners + Dataset: + type: object + properties: + id: + type: string + readOnly: true + description: Dataset identifier. + org_id: + type: string + readOnly: true + description: Owning organisation ID. + name: + type: string + readOnly: true + description: Human-readable dataset name. + kind: + readOnly: true + description: Artifact kind (always 'dataset' for this endpoint). + $ref: '#/components/schemas/ArtifactKind' + status: + readOnly: true + description: 'Dataset status: assembling, ready, or deleted.' + $ref: '#/components/schemas/ArtifactStatus' + location: + type: string + readOnly: true + description: Storage location URI (sf:/). + metadata: + type: object + readOnly: true + description: Arbitrary metadata blob (schema_type, row_count, etc.). + nullable: true + additionalProperties: {} + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + description: Creation timestamp (UTC). + required: + - created_at + - id + - kind + - location + - metadata + - name + - org_id + - status + DatasetList: + type: object + properties: + datasets: + type: array + readOnly: true + description: List of datasets. + items: + $ref: '#/components/schemas/Dataset' + prev_key: + type: string + readOnly: true + description: Previous page key. + next_key: + type: string + readOnly: true + description: Next page key. + required: + - datasets + DatasetCreate: + type: object + properties: + name: + type: string + minLength: 1 + description: Human-readable name for the dataset. + metadata: + type: object + default: null + description: "Optional metadata blob: schema_type, description, row_count,\ + \ format hints, etc. Platform treats dataset bytes as opaque \u2014 format\ + \ details live here." + nullable: true + additionalProperties: {} + required: + - name + Hyperparameters: + type: object + properties: + learning_rate: + type: number + readOnly: true + epochs: + type: integer + readOnly: true + effective_batch_size: + type: integer + readOnly: true + max_seq_length: + type: integer + readOnly: true + lora_rank: + type: integer + readOnly: true + lora_alpha: + type: integer + readOnly: true + required: + - effective_batch_size + - epochs + - learning_rate + - lora_alpha + - lora_rank + - max_seq_length + FineTuneJobView: + type: object + properties: + id: + type: string + readOnly: true + description: Fine-tune job ID (same as the underlying deployment ID). + name: + type: string + readOnly: true + status: + type: string + readOnly: true + description: "Underlying Saturn job status: pending, running, stopping,\ + \ stopped, completed, or error. Same vocabulary as the rest of the platform\ + \ \u2014 TF intentionally does not translate to a product-specific set." + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + started_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + nullable: true + finished_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + nullable: true + base_model: + type: string + readOnly: true + hyperparameters: + readOnly: true + allOf: + - $ref: '#/components/schemas/Hyperparameters' + dataset_id: + type: string + readOnly: true + output_location: + type: string + readOnly: true + description: 'Structured location of the job''s RW output folder: sf:/jobs//.' + checkpoint: + readOnly: true + description: Resolved checkpoint artifact (kind=checkpoint). Populated by + the future checkpoint-registration PR; null until then. + nullable: true + required: + - base_model + - checkpoint + - created_at + - dataset_id + - finished_at + - hyperparameters + - id + - name + - output_location + - started_at + - status + FineTuneJobList: + type: object + properties: + jobs: + type: array + readOnly: true + description: List of fine-tuning jobs (FineTuneJobView projections). + items: + $ref: '#/components/schemas/FineTuneJobView' + prev_key: + type: string + readOnly: true + description: Previous page key. + next_key: + type: string + readOnly: true + description: Next page key. + required: + - jobs + Hyperparameters1: + type: object + properties: + learning_rate: + type: number + minimum: 0.0 + maximum: 1.0 + description: Learning rate. Must be in (0, 1). + epochs: + type: integer + minimum: 1 + maximum: 10 + description: Number of training epochs. Must be in [1, 10]. + effective_batch_size: + type: integer + minimum: 1 + maximum: 128 + description: "Effective batch size \u2014 the number of samples whose gradients\ + \ are averaged per optimizer step. The platform translates this to axolotl's\ + \ ``gradient_accumulation_steps \xD7 micro_batch_size``; ``micro_batch_size``\ + \ is auto-found at runtime to fit GPU memory." + max_seq_length: + type: integer + minimum: 128 + maximum: 16384 + description: Maximum sequence length (tokens) per training sample. Longer + sequences use proportionally more GPU memory. Must be in [128, 16384]. + lora_rank: + type: integer + minimum: 1 + maximum: 128 + description: LoRA adapter rank. Must be in [1, 128]. + lora_alpha: + type: integer + minimum: 1 + maximum: 256 + description: LoRA alpha scaling factor. Must be in [1, 256]. + required: + - effective_batch_size + - epochs + - learning_rate + - lora_alpha + - lora_rank + - max_seq_length + FineTuneJobCreate: + type: object + properties: + name: + type: string + minLength: 1 + description: Human-readable name for the fine-tuning job. + base_model: + type: string + minLength: 1 + description: Base model to fine-tune. Must be one of the platform's supported + models (see SUPPORTED_MODELS allow-list). + dataset_id: + type: string + minLength: 1 + description: Identifier of a token-factory dataset artifact. The dataset + must have status=READY and belong to the same org as the requester. + hyperparameters: + description: Training hyperparameters. + allOf: + - $ref: '#/components/schemas/Hyperparameters1' + instance_size: + type: string + minLength: 1 + description: Saturn instance size to run the training pod on. Must be a + GPU-equipped size (gpu > 0). + required: + - base_model + - dataset_id + - hyperparameters + - instance_size + - name AggregatedUsage: type: object properties: @@ -15950,6 +16867,14 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + default: null + description: User-defined config files written to $HOME at pod startup. + Keys are relative paths; values contain content and mode. + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string default: null @@ -16044,6 +16969,14 @@ components: allOf: - $ref: '#/components/schemas/ExtraPackages' nullable: true + config_files: + type: object + default: null + description: User-defined config files written to $HOME at pod startup. + Keys are relative paths; values contain content and mode. + additionalProperties: + $ref: '#/components/schemas/ConfigFileEntry' + nullable: true start_script: type: string default: null diff --git a/docs/Artifact.md b/docs/Artifact.md new file mode 100644 index 0000000..b8ea539 --- /dev/null +++ b/docs/Artifact.md @@ -0,0 +1,37 @@ +# Artifact + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Artifact identifier. | [readonly] +**org_id** | **str** | Owning organisation ID. | [readonly] +**name** | **str** | Human-readable artifact name. | [readonly] +**kind** | [**ArtifactKind**](ArtifactKind.md) | | +**location** | **str** | Storage location (NFS path or object storage URI). | [readonly] +**producer** | **Dict[str, object]** | JSONB snapshot of the producer resource: {id, kind, name}. Null if artifact was uploaded directly. | [readonly] +**metadata** | **Dict[str, object]** | Arbitrary metadata blob. | [readonly] +**created_at** | **str** | Creation timestamp (UTC). | [readonly] +**status** | [**ArtifactStatus**](ArtifactStatus.md) | | + +## Example + +```python +from saturn_api.models.artifact import Artifact + +# TODO update the JSON string below +json = "{}" +# create an instance of Artifact from a JSON string +artifact_instance = Artifact.from_json(json) +# print the JSON string representation of the object +print(Artifact.to_json()) + +# convert the object into a dict +artifact_dict = artifact_instance.to_dict() +# create an instance of Artifact from a dict +artifact_from_dict = Artifact.from_dict(artifact_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactCreate.md b/docs/ArtifactCreate.md new file mode 100644 index 0000000..7b6dba9 --- /dev/null +++ b/docs/ArtifactCreate.md @@ -0,0 +1,34 @@ +# ArtifactCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Human-readable name for the artifact. | +**kind** | [**ArtifactKind**](ArtifactKind.md) | | [optional] +**location** | **str** | Storage location (NFS path or object storage URI). | +**status** | [**ArtifactStatus**](ArtifactStatus.md) | | [optional] +**producer** | **Dict[str, object]** | JSONB snapshot of the Saturn resource that produced this artifact. Shape: {id, kind, name}. Null if uploaded directly. | [optional] +**metadata** | **Dict[str, object]** | Arbitrary metadata blob: schema_type, row_count, base_model, epoch, metrics, etc. | [optional] + +## Example + +```python +from saturn_api.models.artifact_create import ArtifactCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of ArtifactCreate from a JSON string +artifact_create_instance = ArtifactCreate.from_json(json) +# print the JSON string representation of the object +print(ArtifactCreate.to_json()) + +# convert the object into a dict +artifact_create_dict = artifact_create_instance.to_dict() +# create an instance of ArtifactCreate from a dict +artifact_create_from_dict = ArtifactCreate.from_dict(artifact_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactKind.md b/docs/ArtifactKind.md new file mode 100644 index 0000000..a2d68dd --- /dev/null +++ b/docs/ArtifactKind.md @@ -0,0 +1,14 @@ +# ArtifactKind + + +## Enum + +* `DATASET` (value: `'dataset'`) + +* `CHECKPOINT` (value: `'checkpoint'`) + +* `MODEL_MINUS_WEIGHTS` (value: `'model-weights'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactList.md b/docs/ArtifactList.md new file mode 100644 index 0000000..ec6cc22 --- /dev/null +++ b/docs/ArtifactList.md @@ -0,0 +1,31 @@ +# ArtifactList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**artifacts** | [**List[Artifact]**](Artifact.md) | List of artifacts. | [readonly] +**prev_key** | **str** | Previous page key. | [optional] [readonly] +**next_key** | **str** | Next page key. | [optional] [readonly] + +## Example + +```python +from saturn_api.models.artifact_list import ArtifactList + +# TODO update the JSON string below +json = "{}" +# create an instance of ArtifactList from a JSON string +artifact_list_instance = ArtifactList.from_json(json) +# print the JSON string representation of the object +print(ArtifactList.to_json()) + +# convert the object into a dict +artifact_list_dict = artifact_list_instance.to_dict() +# create an instance of ArtifactList from a dict +artifact_list_from_dict = ArtifactList.from_dict(artifact_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactStatus.md b/docs/ArtifactStatus.md new file mode 100644 index 0000000..842cb8e --- /dev/null +++ b/docs/ArtifactStatus.md @@ -0,0 +1,18 @@ +# ArtifactStatus + + +## Enum + +* `ASSEMBLING` (value: `'assembling'`) + +* `PENDING` (value: `'pending'`) + +* `READY` (value: `'ready'`) + +* `ERROR` (value: `'error'`) + +* `DELETED` (value: `'deleted'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactUpdate.md b/docs/ArtifactUpdate.md new file mode 100644 index 0000000..8d8882b --- /dev/null +++ b/docs/ArtifactUpdate.md @@ -0,0 +1,30 @@ +# ArtifactUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**ArtifactStatus**](ArtifactStatus.md) | | [optional] +**metadata** | **Dict[str, object]** | Updated metadata blob. | [optional] + +## Example + +```python +from saturn_api.models.artifact_update import ArtifactUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ArtifactUpdate from a JSON string +artifact_update_instance = ArtifactUpdate.from_json(json) +# print the JSON string representation of the object +print(ArtifactUpdate.to_json()) + +# convert the object into a dict +artifact_update_dict = artifact_update_instance.to_dict() +# create an instance of ArtifactUpdate from a dict +artifact_update_from_dict = ArtifactUpdate.from_dict(artifact_update_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactsApi.md b/docs/ArtifactsApi.md new file mode 100644 index 0000000..62e5fb8 --- /dev/null +++ b/docs/ArtifactsApi.md @@ -0,0 +1,423 @@ +# saturn_api.ArtifactsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](ArtifactsApi.md#create) | **POST** /api/orgs/{org_id}/artifacts | Create artifact +[**delete**](ArtifactsApi.md#delete) | **DELETE** /api/orgs/{org_id}/artifacts/{artifact_id} | Delete artifact +[**get**](ArtifactsApi.md#get) | **GET** /api/orgs/{org_id}/artifacts/{artifact_id} | Get artifact +[**list**](ArtifactsApi.md#list) | **GET** /api/orgs/{org_id}/artifacts | List artifacts +[**update**](ArtifactsApi.md#update) | **PATCH** /api/orgs/{org_id}/artifacts/{artifact_id} | Update artifact + + +# **create** +> Artifact create(org_id, artifact_create) + +Create artifact + +Create a new artifact. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.artifact import Artifact +from saturn_api.models.artifact_create import ArtifactCreate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ArtifactsApi(api_client) + org_id = 'org_id_example' # str | + artifact_create = saturn_api.ArtifactCreate() # ArtifactCreate | + + try: + # Create artifact + api_response = await api_instance.create(org_id, artifact_create) + print("The response of ArtifactsApi->create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ArtifactsApi->create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **artifact_create** | [**ArtifactCreate**](ArtifactCreate.md)| | + +### Return type + +[**Artifact**](Artifact.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> delete(org_id, artifact_id) + +Delete artifact + +Delete an artifact. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ArtifactsApi(api_client) + org_id = 'org_id_example' # str | + artifact_id = 'artifact_id_example' # str | + + try: + # Delete artifact + await api_instance.delete(org_id, artifact_id) + except Exception as e: + print("Exception when calling ArtifactsApi->delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **artifact_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Artifact get(org_id, artifact_id) + +Get artifact + +Get an artifact. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.artifact import Artifact +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ArtifactsApi(api_client) + org_id = 'org_id_example' # str | + artifact_id = 'artifact_id_example' # str | + + try: + # Get artifact + api_response = await api_instance.get(org_id, artifact_id) + print("The response of ArtifactsApi->get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ArtifactsApi->get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **artifact_id** | **str**| | + +### Return type + +[**Artifact**](Artifact.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> ArtifactList list(org_id, kind=kind, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + +List artifacts + +Paginated list of artifacts. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.artifact_kind import ArtifactKind +from saturn_api.models.artifact_list import ArtifactList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ArtifactsApi(api_client) + org_id = 'org_id_example' # str | + kind = saturn_api.ArtifactKind() # ArtifactKind | Filter artifacts by kind. (optional) + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Page size. (optional) (default to 100) + descending = False # bool | List results in descending order. (optional) (default to False) + + try: + # List artifacts + api_response = await api_instance.list(org_id, kind=kind, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + print("The response of ArtifactsApi->list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ArtifactsApi->list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **kind** | [**ArtifactKind**](.md)| Filter artifacts by kind. | [optional] + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Page size. | [optional] [default to 100] + **descending** | **bool**| List results in descending order. | [optional] [default to False] + +### Return type + +[**ArtifactList**](ArtifactList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> Artifact update(org_id, artifact_id, artifact_update) + +Update artifact + +Update an artifact. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.artifact import Artifact +from saturn_api.models.artifact_update import ArtifactUpdate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.ArtifactsApi(api_client) + org_id = 'org_id_example' # str | + artifact_id = 'artifact_id_example' # str | + artifact_update = saturn_api.ArtifactUpdate() # ArtifactUpdate | + + try: + # Update artifact + api_response = await api_instance.update(org_id, artifact_id, artifact_update) + print("The response of ArtifactsApi->update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ArtifactsApi->update: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **artifact_id** | **str**| | + **artifact_update** | [**ArtifactUpdate**](ArtifactUpdate.md)| | + +### Return type + +[**Artifact**](Artifact.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ConfigFileEntry.md b/docs/ConfigFileEntry.md new file mode 100644 index 0000000..e8d4a99 --- /dev/null +++ b/docs/ConfigFileEntry.md @@ -0,0 +1,30 @@ +# ConfigFileEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | Content of the config file. | +**mode** | **str** | File mode as a 4-character octal string, e.g. '0644'. | [optional] [default to '0644'] + +## Example + +```python +from saturn_api.models.config_file_entry import ConfigFileEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfigFileEntry from a JSON string +config_file_entry_instance = ConfigFileEntry.from_json(json) +# print the JSON string representation of the object +print(ConfigFileEntry.to_json()) + +# convert the object into a dict +config_file_entry_dict = config_file_entry_instance.to_dict() +# create an instance of ConfigFileEntry from a dict +config_file_entry_from_dict = ConfigFileEntry.from_dict(config_file_entry_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Dataset.md b/docs/Dataset.md new file mode 100644 index 0000000..8e748b9 --- /dev/null +++ b/docs/Dataset.md @@ -0,0 +1,36 @@ +# Dataset + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Dataset identifier. | [readonly] +**org_id** | **str** | Owning organisation ID. | [readonly] +**name** | **str** | Human-readable dataset name. | [readonly] +**kind** | [**ArtifactKind**](ArtifactKind.md) | | +**status** | [**ArtifactStatus**](ArtifactStatus.md) | | +**location** | **str** | Storage location URI (sf:<folder_id>/<path>). | [readonly] +**metadata** | **Dict[str, object]** | Arbitrary metadata blob (schema_type, row_count, etc.). | [readonly] +**created_at** | **str** | Creation timestamp (UTC). | [readonly] + +## Example + +```python +from saturn_api.models.dataset import Dataset + +# TODO update the JSON string below +json = "{}" +# create an instance of Dataset from a JSON string +dataset_instance = Dataset.from_json(json) +# print the JSON string representation of the object +print(Dataset.to_json()) + +# convert the object into a dict +dataset_dict = dataset_instance.to_dict() +# create an instance of Dataset from a dict +dataset_from_dict = Dataset.from_dict(dataset_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetCreate.md b/docs/DatasetCreate.md new file mode 100644 index 0000000..725f9c2 --- /dev/null +++ b/docs/DatasetCreate.md @@ -0,0 +1,30 @@ +# DatasetCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Human-readable name for the dataset. | +**metadata** | **Dict[str, object]** | Optional metadata blob: schema_type, description, row_count, format hints, etc. Platform treats dataset bytes as opaque — format details live here. | [optional] + +## Example + +```python +from saturn_api.models.dataset_create import DatasetCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetCreate from a JSON string +dataset_create_instance = DatasetCreate.from_json(json) +# print the JSON string representation of the object +print(DatasetCreate.to_json()) + +# convert the object into a dict +dataset_create_dict = dataset_create_instance.to_dict() +# create an instance of DatasetCreate from a dict +dataset_create_from_dict = DatasetCreate.from_dict(dataset_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetList.md b/docs/DatasetList.md new file mode 100644 index 0000000..adc3aa9 --- /dev/null +++ b/docs/DatasetList.md @@ -0,0 +1,31 @@ +# DatasetList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**datasets** | [**List[Dataset]**](Dataset.md) | List of datasets. | [readonly] +**prev_key** | **str** | Previous page key. | [optional] [readonly] +**next_key** | **str** | Next page key. | [optional] [readonly] + +## Example + +```python +from saturn_api.models.dataset_list import DatasetList + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetList from a JSON string +dataset_list_instance = DatasetList.from_json(json) +# print the JSON string representation of the object +print(DatasetList.to_json()) + +# convert the object into a dict +dataset_list_dict = dataset_list_instance.to_dict() +# create an instance of DatasetList from a dict +dataset_list_from_dict = DatasetList.from_dict(dataset_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetsApi.md b/docs/DatasetsApi.md new file mode 100644 index 0000000..46c0ee6 --- /dev/null +++ b/docs/DatasetsApi.md @@ -0,0 +1,420 @@ +# saturn_api.DatasetsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](DatasetsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/datasets | Create dataset +[**delete**](DatasetsApi.md#delete) | **DELETE** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Delete dataset +[**get**](DatasetsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Get dataset +[**list**](DatasetsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/datasets | List datasets +[**seal**](DatasetsApi.md#seal) | **POST** /api/orgs/{org_id}/token-factory/datasets/{dataset_id}/seal | Seal dataset + + +# **create** +> Dataset create(org_id, dataset_create) + +Create dataset + +Create a new dataset. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.dataset import Dataset +from saturn_api.models.dataset_create import DatasetCreate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + dataset_create = saturn_api.DatasetCreate() # DatasetCreate | + + try: + # Create dataset + api_response = await api_instance.create(org_id, dataset_create) + print("The response of DatasetsApi->create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **dataset_create** | [**DatasetCreate**](DatasetCreate.md)| | + +### Return type + +[**Dataset**](Dataset.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> delete(org_id, dataset_id) + +Delete dataset + +Delete a dataset. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + dataset_id = 'dataset_id_example' # str | + + try: + # Delete dataset + await api_instance.delete(org_id, dataset_id) + except Exception as e: + print("Exception when calling DatasetsApi->delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **dataset_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Dataset get(org_id, dataset_id) + +Get dataset + +Get a dataset. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.dataset import Dataset +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + dataset_id = 'dataset_id_example' # str | + + try: + # Get dataset + api_response = await api_instance.get(org_id, dataset_id) + print("The response of DatasetsApi->get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **dataset_id** | **str**| | + +### Return type + +[**Dataset**](Dataset.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> DatasetList list(org_id, status=status, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + +List datasets + +Paginated list of datasets. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.artifact_status import ArtifactStatus +from saturn_api.models.dataset_list import DatasetList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + status = saturn_api.ArtifactStatus() # ArtifactStatus | Filter datasets by status. (optional) + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Page size. (optional) (default to 100) + descending = False # bool | List results in descending order. (optional) (default to False) + + try: + # List datasets + api_response = await api_instance.list(org_id, status=status, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + print("The response of DatasetsApi->list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **status** | [**ArtifactStatus**](.md)| Filter datasets by status. | [optional] + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Page size. | [optional] [default to 100] + **descending** | **bool**| List results in descending order. | [optional] [default to False] + +### Return type + +[**DatasetList**](DatasetList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **seal** +> Dataset seal(org_id, dataset_id) + +Seal dataset + +Transition a dataset from `assembling` to `ready`, making it immutable. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.dataset import Dataset +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + dataset_id = 'dataset_id_example' # str | + + try: + # Seal dataset + api_response = await api_instance.seal(org_id, dataset_id) + print("The response of DatasetsApi->seal:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->seal: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **dataset_id** | **str**| | + +### Return type + +[**Dataset**](Dataset.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sealed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Deployment.md b/docs/Deployment.md index 6281a1d..d300b6d 100644 --- a/docs/Deployment.md +++ b/docs/Deployment.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **instance_size** | **str** | Instance size of the deployment. | [readonly] **image_tag** | [**ImageTag**](ImageTag.md) | Image tag that is attached to the deployment. | [readonly] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [readonly] +**config_files** | **Dict[str, Dict[str, str]]** | User-defined config files written to $HOME at pod startup. | [optional] [readonly] **scale** | **int** | Number of pod replicas. | [readonly] **start_script** | **str** | Shell script that runs on start before the primary command. | [optional] [readonly] **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [readonly] diff --git a/docs/DeploymentCreate.md b/docs/DeploymentCreate.md index 40efe96..e62c08e 100644 --- a/docs/DeploymentCreate.md +++ b/docs/DeploymentCreate.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [optional] **external_repo_attachments** | [**List[ExternalRepoAttachmentNested]**](ExternalRepoAttachmentNested.md) | List of external repo attachments for the deployment. | [optional] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode. | [optional] **start_script** | **str** | Shell script to run on start before the primary command. | [optional] **working_dir** | **str** | Initial working directory for the deployment. | [optional] [default to '/home/jovyan/workspace'] **is_spot** | **bool** | Enables running on spot instance sizes. | [optional] [default to False] diff --git a/docs/DeploymentSpec.md b/docs/DeploymentSpec.md index 0e05470..a1dc9cd 100644 --- a/docs/DeploymentSpec.md +++ b/docs/DeploymentSpec.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | | [optional] **working_directory** | **str** | | [optional] **extra_packages** | [**ExtraPackagesRecipe**](ExtraPackagesRecipe.md) | | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | | [optional] **start_script** | **str** | | [optional] **token_scope** | **str** | | [optional] **dask_cluster** | [**DaskClusterAttachment**](DaskClusterAttachment.md) | | [optional] diff --git a/docs/DeploymentUpdate.md b/docs/DeploymentUpdate.md index d8ba71c..51e6613 100644 --- a/docs/DeploymentUpdate.md +++ b/docs/DeploymentUpdate.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [optional] **external_repo_attachments** | [**List[ExternalRepoAttachmentNested]**](ExternalRepoAttachmentNested.md) | List of external repo attachments. | [optional] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode. | [optional] **start_script** | **str** | Shell script that runs on start before the primary command. | [optional] **working_dir** | **str** | Initial working directory. | [optional] **instance_size** | **str** | Instance size of the deployment. | [optional] diff --git a/docs/FineTuneJobCreate.md b/docs/FineTuneJobCreate.md new file mode 100644 index 0000000..56ff9eb --- /dev/null +++ b/docs/FineTuneJobCreate.md @@ -0,0 +1,33 @@ +# FineTuneJobCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Human-readable name for the fine-tuning job. | +**base_model** | **str** | Base model to fine-tune. Must be one of the platform's supported models (see SUPPORTED_MODELS allow-list). | +**dataset_id** | **str** | Identifier of a token-factory dataset artifact. The dataset must have status=READY and belong to the same org as the requester. | +**hyperparameters** | [**Hyperparameters1**](Hyperparameters1.md) | Training hyperparameters. | +**instance_size** | **str** | Saturn instance size to run the training pod on. Must be a GPU-equipped size (gpu > 0). | + +## Example + +```python +from saturn_api.models.fine_tune_job_create import FineTuneJobCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of FineTuneJobCreate from a JSON string +fine_tune_job_create_instance = FineTuneJobCreate.from_json(json) +# print the JSON string representation of the object +print(FineTuneJobCreate.to_json()) + +# convert the object into a dict +fine_tune_job_create_dict = fine_tune_job_create_instance.to_dict() +# create an instance of FineTuneJobCreate from a dict +fine_tune_job_create_from_dict = FineTuneJobCreate.from_dict(fine_tune_job_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FineTuneJobList.md b/docs/FineTuneJobList.md new file mode 100644 index 0000000..d3ff0b2 --- /dev/null +++ b/docs/FineTuneJobList.md @@ -0,0 +1,31 @@ +# FineTuneJobList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobs** | [**List[FineTuneJobView]**](FineTuneJobView.md) | List of fine-tuning jobs (FineTuneJobView projections). | [readonly] +**prev_key** | **str** | Previous page key. | [optional] [readonly] +**next_key** | **str** | Next page key. | [optional] [readonly] + +## Example + +```python +from saturn_api.models.fine_tune_job_list import FineTuneJobList + +# TODO update the JSON string below +json = "{}" +# create an instance of FineTuneJobList from a JSON string +fine_tune_job_list_instance = FineTuneJobList.from_json(json) +# print the JSON string representation of the object +print(FineTuneJobList.to_json()) + +# convert the object into a dict +fine_tune_job_list_dict = fine_tune_job_list_instance.to_dict() +# create an instance of FineTuneJobList from a dict +fine_tune_job_list_from_dict = FineTuneJobList.from_dict(fine_tune_job_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FineTuneJobView.md b/docs/FineTuneJobView.md new file mode 100644 index 0000000..85c72c4 --- /dev/null +++ b/docs/FineTuneJobView.md @@ -0,0 +1,39 @@ +# FineTuneJobView + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Fine-tune job ID (same as the underlying deployment ID). | [readonly] +**name** | **str** | | [readonly] +**status** | **str** | Underlying Saturn job status: pending, running, stopping, stopped, completed, or error. Same vocabulary as the rest of the platform — TF intentionally does not translate to a product-specific set. | [readonly] +**created_at** | **str** | | [readonly] +**started_at** | **str** | | [readonly] +**finished_at** | **str** | | [readonly] +**base_model** | **str** | | [readonly] +**hyperparameters** | [**Hyperparameters**](Hyperparameters.md) | | [readonly] +**dataset_id** | **str** | | [readonly] +**output_location** | **str** | Structured location of the job's RW output folder: sf:<tf-jobs-folder-id>/jobs/<job-id>/. | [readonly] +**checkpoint** | **object** | Resolved checkpoint artifact (kind=checkpoint). Populated by the future checkpoint-registration PR; null until then. | [readonly] + +## Example + +```python +from saturn_api.models.fine_tune_job_view import FineTuneJobView + +# TODO update the JSON string below +json = "{}" +# create an instance of FineTuneJobView from a JSON string +fine_tune_job_view_instance = FineTuneJobView.from_json(json) +# print the JSON string representation of the object +print(FineTuneJobView.to_json()) + +# convert the object into a dict +fine_tune_job_view_dict = fine_tune_job_view_instance.to_dict() +# create an instance of FineTuneJobView from a dict +fine_tune_job_view_from_dict = FineTuneJobView.from_dict(fine_tune_job_view_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FineTuningJobsApi.md b/docs/FineTuningJobsApi.md new file mode 100644 index 0000000..4c70c91 --- /dev/null +++ b/docs/FineTuningJobsApi.md @@ -0,0 +1,339 @@ +# saturn_api.FineTuningJobsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](FineTuningJobsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | Create fine-tuning job +[**get**](FineTuningJobsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id} | Get fine-tuning job +[**jobs_cancel**](FineTuningJobsApi.md#jobs_cancel) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel | Cancel fine-tuning job +[**list**](FineTuningJobsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | List fine-tuning jobs + + +# **create** +> FineTuneJobView create(org_id, fine_tune_job_create) + +Create fine-tuning job + +Create a new fine-tuning job. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.fine_tune_job_create import FineTuneJobCreate +from saturn_api.models.fine_tune_job_view import FineTuneJobView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.FineTuningJobsApi(api_client) + org_id = 'org_id_example' # str | + fine_tune_job_create = saturn_api.FineTuneJobCreate() # FineTuneJobCreate | + + try: + # Create fine-tuning job + api_response = await api_instance.create(org_id, fine_tune_job_create) + print("The response of FineTuningJobsApi->create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FineTuningJobsApi->create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **fine_tune_job_create** | [**FineTuneJobCreate**](FineTuneJobCreate.md)| | + +### Return type + +[**FineTuneJobView**](FineTuneJobView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> FineTuneJobView get(org_id, job_id) + +Get fine-tuning job + +Get a fine-tuning job. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.fine_tune_job_view import FineTuneJobView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.FineTuningJobsApi(api_client) + org_id = 'org_id_example' # str | + job_id = 'job_id_example' # str | + + try: + # Get fine-tuning job + api_response = await api_instance.get(org_id, job_id) + print("The response of FineTuningJobsApi->get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FineTuningJobsApi->get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **job_id** | **str**| | + +### Return type + +[**FineTuneJobView**](FineTuneJobView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **jobs_cancel** +> FineTuneJobView jobs_cancel(org_id, job_id) + +Cancel fine-tuning job + +Stop the underlying intermittent deployment. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.fine_tune_job_view import FineTuneJobView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.FineTuningJobsApi(api_client) + org_id = 'org_id_example' # str | + job_id = 'job_id_example' # str | + + try: + # Cancel fine-tuning job + api_response = await api_instance.jobs_cancel(org_id, job_id) + print("The response of FineTuningJobsApi->jobs_cancel:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FineTuningJobsApi->jobs_cancel: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **job_id** | **str**| | + +### Return type + +[**FineTuneJobView**](FineTuneJobView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> FineTuneJobList list(org_id, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + +List fine-tuning jobs + +Paginated list of fine-tuning jobs. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.fine_tune_job_list import FineTuneJobList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.FineTuningJobsApi(api_client) + org_id = 'org_id_example' # str | + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Page size. (optional) (default to 100) + descending = False # bool | List results in descending order. (optional) (default to False) + + try: + # List fine-tuning jobs + api_response = await api_instance.list(org_id, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + print("The response of FineTuningJobsApi->list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FineTuningJobsApi->list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Page size. | [optional] [default to 100] + **descending** | **bool**| List results in descending order. | [optional] [default to False] + +### Return type + +[**FineTuneJobList**](FineTuneJobList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Hyperparameters.md b/docs/Hyperparameters.md new file mode 100644 index 0000000..371ece8 --- /dev/null +++ b/docs/Hyperparameters.md @@ -0,0 +1,34 @@ +# Hyperparameters + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**learning_rate** | **float** | | [readonly] +**epochs** | **int** | | [readonly] +**effective_batch_size** | **int** | | [readonly] +**max_seq_length** | **int** | | [readonly] +**lora_rank** | **int** | | [readonly] +**lora_alpha** | **int** | | [readonly] + +## Example + +```python +from saturn_api.models.hyperparameters import Hyperparameters + +# TODO update the JSON string below +json = "{}" +# create an instance of Hyperparameters from a JSON string +hyperparameters_instance = Hyperparameters.from_json(json) +# print the JSON string representation of the object +print(Hyperparameters.to_json()) + +# convert the object into a dict +hyperparameters_dict = hyperparameters_instance.to_dict() +# create an instance of Hyperparameters from a dict +hyperparameters_from_dict = Hyperparameters.from_dict(hyperparameters_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Hyperparameters1.md b/docs/Hyperparameters1.md new file mode 100644 index 0000000..2a1d460 --- /dev/null +++ b/docs/Hyperparameters1.md @@ -0,0 +1,34 @@ +# Hyperparameters1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**learning_rate** | **float** | Learning rate. Must be in (0, 1). | +**epochs** | **int** | Number of training epochs. Must be in [1, 10]. | +**effective_batch_size** | **int** | Effective batch size — the number of samples whose gradients are averaged per optimizer step. The platform translates this to axolotl's ``gradient_accumulation_steps × micro_batch_size``; ``micro_batch_size`` is auto-found at runtime to fit GPU memory. | +**max_seq_length** | **int** | Maximum sequence length (tokens) per training sample. Longer sequences use proportionally more GPU memory. Must be in [128, 16384]. | +**lora_rank** | **int** | LoRA adapter rank. Must be in [1, 128]. | +**lora_alpha** | **int** | LoRA alpha scaling factor. Must be in [1, 256]. | + +## Example + +```python +from saturn_api.models.hyperparameters1 import Hyperparameters1 + +# TODO update the JSON string below +json = "{}" +# create an instance of Hyperparameters1 from a JSON string +hyperparameters1_instance = Hyperparameters1.from_json(json) +# print the JSON string representation of the object +print(Hyperparameters1.to_json()) + +# convert the object into a dict +hyperparameters1_dict = hyperparameters1_instance.to_dict() +# create an instance of Hyperparameters1 from a dict +hyperparameters1_from_dict = Hyperparameters1.from_dict(hyperparameters1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Job.md b/docs/Job.md index 6b18140..780d767 100644 --- a/docs/Job.md +++ b/docs/Job.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **instance_size** | **str** | Instance size of the job. | [readonly] **image_tag** | [**ImageTag**](ImageTag.md) | Image tag that is attached to the job. | [readonly] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [readonly] +**config_files** | **Dict[str, Dict[str, str]]** | User-defined config files written to $HOME at pod startup. | [optional] [readonly] **cron_schedule_options** | [**CronSchedule**](CronSchedule.md) | Cron schedule configuration for scheduled jobs. | [optional] [readonly] **start_script** | **str** | Shell script that runs on start before the primary command. | [optional] [readonly] **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [readonly] diff --git a/docs/JobCreate.md b/docs/JobCreate.md index a7c9f7e..7426336 100644 --- a/docs/JobCreate.md +++ b/docs/JobCreate.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [optional] **external_repo_attachments** | [**List[ExternalRepoAttachmentNested]**](ExternalRepoAttachmentNested.md) | List of external repo attachments for the job. | [optional] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode. | [optional] **start_script** | **str** | Shell script to run on start before the primary command. | [optional] **working_dir** | **str** | Initial working directory for the job. | [optional] [default to '/home/jovyan/workspace'] **is_spot** | **bool** | Enables running on spot instance sizes. | [optional] [default to False] diff --git a/docs/JobSpec.md b/docs/JobSpec.md index 899f591..dd15ca6 100644 --- a/docs/JobSpec.md +++ b/docs/JobSpec.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | | [optional] **working_directory** | **str** | | [optional] **extra_packages** | [**ExtraPackagesRecipe**](ExtraPackagesRecipe.md) | | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | | [optional] **start_script** | **str** | | [optional] **token_scope** | **str** | | [optional] **dask_cluster** | [**DaskClusterAttachment**](DaskClusterAttachment.md) | | [optional] diff --git a/docs/JobUpdate.md b/docs/JobUpdate.md index 4e4c284..f3278de 100644 --- a/docs/JobUpdate.md +++ b/docs/JobUpdate.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [optional] **external_repo_attachments** | [**List[ExternalRepoAttachmentNested]**](ExternalRepoAttachmentNested.md) | List of external repo attachments. | [optional] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode. | [optional] **start_script** | **str** | Shell script that runs on start before the primary command. | [optional] **working_dir** | **str** | Initial working directory. | [optional] **instance_size** | **str** | Instance size of the job. | [optional] diff --git a/docs/Resource.md b/docs/Resource.md index 0885ec3..f6ac024 100644 --- a/docs/Resource.md +++ b/docs/Resource.md @@ -34,6 +34,7 @@ Name | Type | Description | Notes **instance_size** | **str** | Instance size of the workspace. | [readonly] **image_tag** | [**ImageTag**](ImageTag.md) | Image tag that is attached to the workspace. | [readonly] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [readonly] +**config_files** | **Dict[str, Dict[str, str]]** | User-defined config files written to $HOME at pod startup. | [optional] [readonly] **scale** | **int** | Number of pod replicas. | [readonly] **start_script** | **str** | Shell script that runs on start before the primary command. | [readonly] **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [readonly] diff --git a/docs/Workspace.md b/docs/Workspace.md index 5ecc992..078ca8a 100644 --- a/docs/Workspace.md +++ b/docs/Workspace.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **tags** | **Dict[str, str]** | Descriptive tags for the workspace. | [optional] **image_tag** | [**ImageTag**](ImageTag.md) | Image tag that is attached to the workspace. | [readonly] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [readonly] +**config_files** | **Dict[str, Dict[str, str]]** | User-defined config files written to $HOME at pod startup. | [optional] [readonly] **ide** | **str** | IDE of the workspace | [readonly] **start_script** | **str** | Shell script that runs on start before the primary command. | [readonly] **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [readonly] diff --git a/docs/WorkspaceCreate.md b/docs/WorkspaceCreate.md index 01badbf..e9f472d 100644 --- a/docs/WorkspaceCreate.md +++ b/docs/WorkspaceCreate.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [optional] **external_repo_attachments** | [**List[ExternalRepoAttachmentNested]**](ExternalRepoAttachmentNested.md) | List of external repo attachments for the workspace. | [optional] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode. | [optional] **start_script** | **str** | Shell script to run on start before the primary command. | [optional] **working_dir** | **str** | Initial working directory for the workspace. | [optional] [default to '/home/jovyan/workspace'] **is_spot** | **bool** | Enables running on spot instance sizes. | [optional] [default to False] diff --git a/docs/WorkspaceSpec.md b/docs/WorkspaceSpec.md index 9096e9b..661b771 100644 --- a/docs/WorkspaceSpec.md +++ b/docs/WorkspaceSpec.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | | [optional] **working_directory** | **str** | | [optional] **extra_packages** | [**ExtraPackagesRecipe**](ExtraPackagesRecipe.md) | | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | | [optional] **start_script** | **str** | | [optional] **token_scope** | **str** | | [optional] **dask_cluster** | [**DaskClusterAttachment**](DaskClusterAttachment.md) | | [optional] diff --git a/docs/WorkspaceUpdate.md b/docs/WorkspaceUpdate.md index fed6748..0b1e1ed 100644 --- a/docs/WorkspaceUpdate.md +++ b/docs/WorkspaceUpdate.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **environment_variables** | **Dict[str, str]** | Mapping of environment variable keys to values. | [optional] **external_repo_attachments** | [**List[ExternalRepoAttachmentNested]**](ExternalRepoAttachmentNested.md) | List of external repo attachments. | [optional] **extra_packages** | [**ExtraPackages**](ExtraPackages.md) | Addtitional packages to install on start. | [optional] +**config_files** | [**Dict[str, ConfigFileEntry]**](ConfigFileEntry.md) | User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode. | [optional] **start_script** | **str** | Shell script that runs on start before the primary command. | [optional] **working_dir** | **str** | Initial working directory. | [optional] **instance_size** | **str** | Instance size of the workspace. | [optional] diff --git a/saturn_api/__init__.py b/saturn_api/__init__.py index fe14a76..6e5e018 100644 --- a/saturn_api/__init__.py +++ b/saturn_api/__init__.py @@ -3,17 +3,16 @@ # flake8: noqa """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - __version__ = "1.0.0" # Define package exports @@ -21,13 +20,16 @@ "ActiveApi", "ApiStatusApi", "ApiTokensApi", + "ArtifactsApi", "AuthorizationApi", "ClustersApi", "CurrentUserApi", "DaskClustersApi", + "DatasetsApi", "DeploymentsApi", "ExternalRepoAttachmentsApi", "ExternalReposApi", + "FineTuningJobsApi", "GroupsApi", "ImageTagsApi", "ImagesApi", @@ -66,6 +68,12 @@ "ApiTokenList", "ApiTokenUpdate", "AppInfo", + "Artifact", + "ArtifactCreate", + "ArtifactKind", + "ArtifactList", + "ArtifactStatus", + "ArtifactUpdate", "Auth0Info", "AuthorizationCodeGrant", "AuthorizationGrant", @@ -79,6 +87,7 @@ "ClusterUpdate", "ConcurrencyPolicy", "Condition", + "ConfigFileEntry", "ContainerRuntimeSummary", "ContainerStatus", "CronSchedule", @@ -102,6 +111,9 @@ "DaskWorkerRuntimeSummaryList", "DaskWorkerSummary", "DataPoint", + "Dataset", + "DatasetCreate", + "DatasetList", "DefaultImages", "DefaultSizes", "Deployment", @@ -130,6 +142,9 @@ "ExtraPackagesRecipeApt", "ExtraPackagesRecipeConda", "ExtraPackagesRecipePip", + "FineTuneJobCreate", + "FineTuneJobList", + "FineTuneJobView", "Group", "GroupCreate", "GroupList", @@ -140,6 +155,8 @@ "HardwareType", "HistoricLog", "HistoricLogList", + "Hyperparameters", + "Hyperparameters1", "Identity", "IdentityByGroupId", "IdentityByUserId", @@ -350,13 +367,18 @@ from saturn_api.api.active_api import ActiveApi as ActiveApi from saturn_api.api.api_status_api import ApiStatusApi as ApiStatusApi from saturn_api.api.api_tokens_api import ApiTokensApi as ApiTokensApi +from saturn_api.api.artifacts_api import ArtifactsApi as ArtifactsApi from saturn_api.api.authorization_api import AuthorizationApi as AuthorizationApi from saturn_api.api.clusters_api import ClustersApi as ClustersApi from saturn_api.api.current_user_api import CurrentUserApi as CurrentUserApi from saturn_api.api.dask_clusters_api import DaskClustersApi as DaskClustersApi +from saturn_api.api.datasets_api import DatasetsApi as DatasetsApi from saturn_api.api.deployments_api import DeploymentsApi as DeploymentsApi -from saturn_api.api.external_repo_attachments_api import ExternalRepoAttachmentsApi as ExternalRepoAttachmentsApi +from saturn_api.api.external_repo_attachments_api import ( + ExternalRepoAttachmentsApi as ExternalRepoAttachmentsApi, +) from saturn_api.api.external_repos_api import ExternalReposApi as ExternalReposApi +from saturn_api.api.fine_tuning_jobs_api import FineTuningJobsApi as FineTuningJobsApi from saturn_api.api.groups_api import GroupsApi as GroupsApi from saturn_api.api.image_tags_api import ImageTagsApi as ImageTagsApi from saturn_api.api.images_api import ImagesApi as ImagesApi @@ -369,28 +391,34 @@ from saturn_api.api.orgs_api import OrgsApi as OrgsApi from saturn_api.api.recipes_api import RecipesApi as RecipesApi from saturn_api.api.secrets_api import SecretsApi as SecretsApi -from saturn_api.api.service_account_entitlements_api import ServiceAccountEntitlementsApi as ServiceAccountEntitlementsApi +from saturn_api.api.service_account_entitlements_api import ( + ServiceAccountEntitlementsApi as ServiceAccountEntitlementsApi, +) from saturn_api.api.service_accounts_api import ServiceAccountsApi as ServiceAccountsApi -from saturn_api.api.shared_folder_attachments_api import SharedFolderAttachmentsApi as SharedFolderAttachmentsApi +from saturn_api.api.shared_folder_attachments_api import ( + SharedFolderAttachmentsApi as SharedFolderAttachmentsApi, +) from saturn_api.api.shared_folders_api import SharedFoldersApi as SharedFoldersApi from saturn_api.api.ssh_private_keys_api import SshPrivateKeysApi as SshPrivateKeysApi from saturn_api.api.ssh_public_keys_api import SshPublicKeysApi as SshPublicKeysApi from saturn_api.api.users_api import UsersApi as UsersApi from saturn_api.api.workspaces_api import WorkspacesApi as WorkspacesApi +from saturn_api.api_client import ApiClient as ApiClient # import ApiClient from saturn_api.api_response import ApiResponse as ApiResponse -from saturn_api.api_client import ApiClient as ApiClient from saturn_api.configuration import Configuration as Configuration -from saturn_api.exceptions import OpenApiException as OpenApiException -from saturn_api.exceptions import ApiTypeError as ApiTypeError -from saturn_api.exceptions import ApiValueError as ApiValueError -from saturn_api.exceptions import ApiKeyError as ApiKeyError from saturn_api.exceptions import ApiAttributeError as ApiAttributeError from saturn_api.exceptions import ApiException as ApiException +from saturn_api.exceptions import ApiKeyError as ApiKeyError +from saturn_api.exceptions import ApiTypeError as ApiTypeError +from saturn_api.exceptions import ApiValueError as ApiValueError +from saturn_api.exceptions import OpenApiException as OpenApiException # import models into sdk package -from saturn_api.models.active_resource_list import ActiveResourceList as ActiveResourceList +from saturn_api.models.active_resource_list import ( + ActiveResourceList as ActiveResourceList, +) from saturn_api.models.aggregated_usage import AggregatedUsage as AggregatedUsage from saturn_api.models.api_status import ApiStatus as ApiStatus from saturn_api.models.api_token import ApiToken as ApiToken @@ -399,70 +427,143 @@ from saturn_api.models.api_token_list import ApiTokenList as ApiTokenList from saturn_api.models.api_token_update import ApiTokenUpdate as ApiTokenUpdate from saturn_api.models.app_info import AppInfo as AppInfo +from saturn_api.models.artifact import Artifact as Artifact +from saturn_api.models.artifact_create import ArtifactCreate as ArtifactCreate +from saturn_api.models.artifact_kind import ArtifactKind as ArtifactKind +from saturn_api.models.artifact_list import ArtifactList as ArtifactList +from saturn_api.models.artifact_status import ArtifactStatus as ArtifactStatus +from saturn_api.models.artifact_update import ArtifactUpdate as ArtifactUpdate from saturn_api.models.auth0_info import Auth0Info as Auth0Info -from saturn_api.models.authorization_code_grant import AuthorizationCodeGrant as AuthorizationCodeGrant -from saturn_api.models.authorization_grant import AuthorizationGrant as AuthorizationGrant -from saturn_api.models.authorization_refresh_grant import AuthorizationRefreshGrant as AuthorizationRefreshGrant -from saturn_api.models.authorization_token_response import AuthorizationTokenResponse as AuthorizationTokenResponse +from saturn_api.models.authorization_code_grant import ( + AuthorizationCodeGrant as AuthorizationCodeGrant, +) +from saturn_api.models.authorization_grant import ( + AuthorizationGrant as AuthorizationGrant, +) +from saturn_api.models.authorization_refresh_grant import ( + AuthorizationRefreshGrant as AuthorizationRefreshGrant, +) +from saturn_api.models.authorization_token_response import ( + AuthorizationTokenResponse as AuthorizationTokenResponse, +) from saturn_api.models.build_data import BuildData as BuildData from saturn_api.models.cluster import Cluster as Cluster -from saturn_api.models.cluster_connection_type import ClusterConnectionType as ClusterConnectionType +from saturn_api.models.cluster_connection_type import ( + ClusterConnectionType as ClusterConnectionType, +) from saturn_api.models.cluster_create import ClusterCreate as ClusterCreate from saturn_api.models.cluster_list import ClusterList as ClusterList from saturn_api.models.cluster_update import ClusterUpdate as ClusterUpdate from saturn_api.models.concurrency_policy import ConcurrencyPolicy as ConcurrencyPolicy from saturn_api.models.condition import Condition as Condition -from saturn_api.models.container_runtime_summary import ContainerRuntimeSummary as ContainerRuntimeSummary +from saturn_api.models.config_file_entry import ConfigFileEntry as ConfigFileEntry +from saturn_api.models.container_runtime_summary import ( + ContainerRuntimeSummary as ContainerRuntimeSummary, +) from saturn_api.models.container_status import ContainerStatus as ContainerStatus from saturn_api.models.cron_schedule import CronSchedule as CronSchedule -from saturn_api.models.cron_schedule_create import CronScheduleCreate as CronScheduleCreate -from saturn_api.models.cron_schedule_update import CronScheduleUpdate as CronScheduleUpdate +from saturn_api.models.cron_schedule_create import ( + CronScheduleCreate as CronScheduleCreate, +) +from saturn_api.models.cron_schedule_update import ( + CronScheduleUpdate as CronScheduleUpdate, +) from saturn_api.models.daily_usage import DailyUsage as DailyUsage from saturn_api.models.daily_usage_list import DailyUsageList as DailyUsageList from saturn_api.models.dask_cluster import DaskCluster as DaskCluster from saturn_api.models.dask_cluster_adapt import DaskClusterAdapt as DaskClusterAdapt -from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment as DaskClusterAttachment -from saturn_api.models.dask_cluster_attachment_scheduler import DaskClusterAttachmentScheduler as DaskClusterAttachmentScheduler -from saturn_api.models.dask_cluster_attachment_worker import DaskClusterAttachmentWorker as DaskClusterAttachmentWorker +from saturn_api.models.dask_cluster_attachment import ( + DaskClusterAttachment as DaskClusterAttachment, +) +from saturn_api.models.dask_cluster_attachment_scheduler import ( + DaskClusterAttachmentScheduler as DaskClusterAttachmentScheduler, +) +from saturn_api.models.dask_cluster_attachment_worker import ( + DaskClusterAttachmentWorker as DaskClusterAttachmentWorker, +) from saturn_api.models.dask_cluster_create import DaskClusterCreate as DaskClusterCreate from saturn_api.models.dask_cluster_list import DaskClusterList as DaskClusterList from saturn_api.models.dask_cluster_nested import DaskClusterNested as DaskClusterNested -from saturn_api.models.dask_cluster_runtime_summary import DaskClusterRuntimeSummary as DaskClusterRuntimeSummary +from saturn_api.models.dask_cluster_runtime_summary import ( + DaskClusterRuntimeSummary as DaskClusterRuntimeSummary, +) from saturn_api.models.dask_cluster_scale import DaskClusterScale as DaskClusterScale -from saturn_api.models.dask_cluster_server_options import DaskClusterServerOptions as DaskClusterServerOptions +from saturn_api.models.dask_cluster_server_options import ( + DaskClusterServerOptions as DaskClusterServerOptions, +) from saturn_api.models.dask_cluster_update import DaskClusterUpdate as DaskClusterUpdate from saturn_api.models.dask_components import DaskComponents as DaskComponents -from saturn_api.models.dask_worker_runtime_summary_list import DaskWorkerRuntimeSummaryList as DaskWorkerRuntimeSummaryList +from saturn_api.models.dask_worker_runtime_summary_list import ( + DaskWorkerRuntimeSummaryList as DaskWorkerRuntimeSummaryList, +) from saturn_api.models.dask_worker_summary import DaskWorkerSummary as DaskWorkerSummary from saturn_api.models.data_point import DataPoint as DataPoint +from saturn_api.models.dataset import Dataset as Dataset +from saturn_api.models.dataset_create import DatasetCreate as DatasetCreate +from saturn_api.models.dataset_list import DatasetList as DatasetList from saturn_api.models.default_images import DefaultImages as DefaultImages from saturn_api.models.default_sizes import DefaultSizes as DefaultSizes from saturn_api.models.deployment import Deployment as Deployment from saturn_api.models.deployment_create import DeploymentCreate as DeploymentCreate from saturn_api.models.deployment_list import DeploymentList as DeploymentList from saturn_api.models.deployment_recipe import DeploymentRecipe as DeploymentRecipe -from saturn_api.models.deployment_route_recipe import DeploymentRouteRecipe as DeploymentRouteRecipe -from saturn_api.models.deployment_runtime_summary import DeploymentRuntimeSummary as DeploymentRuntimeSummary -from saturn_api.models.deployment_server_info import DeploymentServerInfo as DeploymentServerInfo +from saturn_api.models.deployment_route_recipe import ( + DeploymentRouteRecipe as DeploymentRouteRecipe, +) +from saturn_api.models.deployment_runtime_summary import ( + DeploymentRuntimeSummary as DeploymentRuntimeSummary, +) +from saturn_api.models.deployment_server_info import ( + DeploymentServerInfo as DeploymentServerInfo, +) from saturn_api.models.deployment_spec import DeploymentSpec as DeploymentSpec from saturn_api.models.deployment_start import DeploymentStart as DeploymentStart from saturn_api.models.deployment_status import DeploymentStatus as DeploymentStatus from saturn_api.models.deployment_update import DeploymentUpdate as DeploymentUpdate from saturn_api.models.external_repo import ExternalRepo as ExternalRepo -from saturn_api.models.external_repo_attachment import ExternalRepoAttachment as ExternalRepoAttachment -from saturn_api.models.external_repo_attachment_create import ExternalRepoAttachmentCreate as ExternalRepoAttachmentCreate -from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList as ExternalRepoAttachmentList -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested as ExternalRepoAttachmentNested -from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe as ExternalRepoAttachmentRecipe -from saturn_api.models.external_repo_attachment_update import ExternalRepoAttachmentUpdate as ExternalRepoAttachmentUpdate -from saturn_api.models.external_repo_create import ExternalRepoCreate as ExternalRepoCreate +from saturn_api.models.external_repo_attachment import ( + ExternalRepoAttachment as ExternalRepoAttachment, +) +from saturn_api.models.external_repo_attachment_create import ( + ExternalRepoAttachmentCreate as ExternalRepoAttachmentCreate, +) +from saturn_api.models.external_repo_attachment_list import ( + ExternalRepoAttachmentList as ExternalRepoAttachmentList, +) +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested as ExternalRepoAttachmentNested, +) +from saturn_api.models.external_repo_attachment_recipe import ( + ExternalRepoAttachmentRecipe as ExternalRepoAttachmentRecipe, +) +from saturn_api.models.external_repo_attachment_update import ( + ExternalRepoAttachmentUpdate as ExternalRepoAttachmentUpdate, +) +from saturn_api.models.external_repo_create import ( + ExternalRepoCreate as ExternalRepoCreate, +) from saturn_api.models.external_repo_list import ExternalRepoList as ExternalRepoList -from saturn_api.models.external_repo_update import ExternalRepoUpdate as ExternalRepoUpdate +from saturn_api.models.external_repo_update import ( + ExternalRepoUpdate as ExternalRepoUpdate, +) from saturn_api.models.extra_packages import ExtraPackages as ExtraPackages -from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe as ExtraPackagesRecipe -from saturn_api.models.extra_packages_recipe_apt import ExtraPackagesRecipeApt as ExtraPackagesRecipeApt -from saturn_api.models.extra_packages_recipe_conda import ExtraPackagesRecipeConda as ExtraPackagesRecipeConda -from saturn_api.models.extra_packages_recipe_pip import ExtraPackagesRecipePip as ExtraPackagesRecipePip +from saturn_api.models.extra_packages_recipe import ( + ExtraPackagesRecipe as ExtraPackagesRecipe, +) +from saturn_api.models.extra_packages_recipe_apt import ( + ExtraPackagesRecipeApt as ExtraPackagesRecipeApt, +) +from saturn_api.models.extra_packages_recipe_conda import ( + ExtraPackagesRecipeConda as ExtraPackagesRecipeConda, +) +from saturn_api.models.extra_packages_recipe_pip import ( + ExtraPackagesRecipePip as ExtraPackagesRecipePip, +) +from saturn_api.models.fine_tune_job_create import ( + FineTuneJobCreate as FineTuneJobCreate, +) +from saturn_api.models.fine_tune_job_list import FineTuneJobList as FineTuneJobList +from saturn_api.models.fine_tune_job_view import FineTuneJobView as FineTuneJobView from saturn_api.models.group import Group as Group from saturn_api.models.group_create import GroupCreate as GroupCreate from saturn_api.models.group_list import GroupList as GroupList @@ -473,8 +574,12 @@ from saturn_api.models.hardware_type import HardwareType as HardwareType from saturn_api.models.historic_log import HistoricLog as HistoricLog from saturn_api.models.historic_log_list import HistoricLogList as HistoricLogList +from saturn_api.models.hyperparameters import Hyperparameters as Hyperparameters +from saturn_api.models.hyperparameters1 import Hyperparameters1 as Hyperparameters1 from saturn_api.models.identity import Identity as Identity -from saturn_api.models.identity_by_group_id import IdentityByGroupId as IdentityByGroupId +from saturn_api.models.identity_by_group_id import ( + IdentityByGroupId as IdentityByGroupId, +) from saturn_api.models.identity_by_user_id import IdentityByUserId as IdentityByUserId from saturn_api.models.identity_reference import IdentityReference as IdentityReference from saturn_api.models.identity_type import IdentityType as IdentityType @@ -491,8 +596,12 @@ from saturn_api.models.image_tag_by_name import ImageTagByName as ImageTagByName from saturn_api.models.image_tag_by_uri import ImageTagByUri as ImageTagByUri from saturn_api.models.image_tag_create import ImageTagCreate as ImageTagCreate -from saturn_api.models.image_tag_create_build import ImageTagCreateBuild as ImageTagCreateBuild -from saturn_api.models.image_tag_create_external import ImageTagCreateExternal as ImageTagCreateExternal +from saturn_api.models.image_tag_create_build import ( + ImageTagCreateBuild as ImageTagCreateBuild, +) +from saturn_api.models.image_tag_create_external import ( + ImageTagCreateExternal as ImageTagCreateExternal, +) from saturn_api.models.image_tag_list import ImageTagList as ImageTagList from saturn_api.models.image_tag_recipe import ImageTagRecipe as ImageTagRecipe from saturn_api.models.image_tag_reference import ImageTagReference as ImageTagReference @@ -511,7 +620,9 @@ from saturn_api.models.job_recipe import JobRecipe as JobRecipe from saturn_api.models.job_restart import JobRestart as JobRestart from saturn_api.models.job_runtime_summary import JobRuntimeSummary as JobRuntimeSummary -from saturn_api.models.job_runtime_summary_list import JobRuntimeSummaryList as JobRuntimeSummaryList +from saturn_api.models.job_runtime_summary_list import ( + JobRuntimeSummaryList as JobRuntimeSummaryList, +) from saturn_api.models.job_server_info import JobServerInfo as JobServerInfo from saturn_api.models.job_spec import JobSpec as JobSpec from saturn_api.models.job_start import JobStart as JobStart @@ -521,46 +632,102 @@ from saturn_api.models.metric_series import MetricSeries as MetricSeries from saturn_api.models.metrics import Metrics as Metrics from saturn_api.models.notification import Notification as Notification -from saturn_api.models.notification_acknowledged import NotificationAcknowledged as NotificationAcknowledged -from saturn_api.models.notification_delete import NotificationDelete as NotificationDelete +from saturn_api.models.notification_acknowledged import ( + NotificationAcknowledged as NotificationAcknowledged, +) +from saturn_api.models.notification_delete import ( + NotificationDelete as NotificationDelete, +) from saturn_api.models.notification_list import NotificationList as NotificationList -from saturn_api.models.notification_subscribe import NotificationSubscribe as NotificationSubscribe -from saturn_api.models.notification_subscription import NotificationSubscription as NotificationSubscription -from saturn_api.models.notification_subscription_list import NotificationSubscriptionList as NotificationSubscriptionList -from saturn_api.models.notification_unsubscribe import NotificationUnsubscribe as NotificationUnsubscribe -from saturn_api.models.object_storage_bulk_delete_results import ObjectStorageBulkDeleteResults as ObjectStorageBulkDeleteResults -from saturn_api.models.object_storage_bulk_download import ObjectStorageBulkDownload as ObjectStorageBulkDownload -from saturn_api.models.object_storage_bulk_reference import ObjectStorageBulkReference as ObjectStorageBulkReference -from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart as ObjectStorageCompletePart -from saturn_api.models.object_storage_completed_upload import ObjectStorageCompletedUpload as ObjectStorageCompletedUpload -from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource as ObjectStorageCopySource -from saturn_api.models.object_storage_dir_details import ObjectStorageDirDetails as ObjectStorageDirDetails -from saturn_api.models.object_storage_file_details import ObjectStorageFileDetails as ObjectStorageFileDetails +from saturn_api.models.notification_subscribe import ( + NotificationSubscribe as NotificationSubscribe, +) +from saturn_api.models.notification_subscription import ( + NotificationSubscription as NotificationSubscription, +) +from saturn_api.models.notification_subscription_list import ( + NotificationSubscriptionList as NotificationSubscriptionList, +) +from saturn_api.models.notification_unsubscribe import ( + NotificationUnsubscribe as NotificationUnsubscribe, +) +from saturn_api.models.object_storage_bulk_delete_results import ( + ObjectStorageBulkDeleteResults as ObjectStorageBulkDeleteResults, +) +from saturn_api.models.object_storage_bulk_download import ( + ObjectStorageBulkDownload as ObjectStorageBulkDownload, +) +from saturn_api.models.object_storage_bulk_reference import ( + ObjectStorageBulkReference as ObjectStorageBulkReference, +) +from saturn_api.models.object_storage_complete_part import ( + ObjectStorageCompletePart as ObjectStorageCompletePart, +) +from saturn_api.models.object_storage_completed_upload import ( + ObjectStorageCompletedUpload as ObjectStorageCompletedUpload, +) +from saturn_api.models.object_storage_copy_source import ( + ObjectStorageCopySource as ObjectStorageCopySource, +) +from saturn_api.models.object_storage_dir_details import ( + ObjectStorageDirDetails as ObjectStorageDirDetails, +) +from saturn_api.models.object_storage_file_details import ( + ObjectStorageFileDetails as ObjectStorageFileDetails, +) from saturn_api.models.object_storage_list import ObjectStorageList as ObjectStorageList -from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload as ObjectStoragePresignedDownload -from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart as ObjectStoragePresignedPart -from saturn_api.models.object_storage_presigned_upload import ObjectStoragePresignedUpload as ObjectStoragePresignedUpload -from saturn_api.models.object_storage_reference import ObjectStorageReference as ObjectStorageReference -from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner as ObjectStorageSharedOwner -from saturn_api.models.object_storage_shared_owner_list import ObjectStorageSharedOwnerList as ObjectStorageSharedOwnerList -from saturn_api.models.object_storage_upload import ObjectStorageUpload as ObjectStorageUpload -from saturn_api.models.object_storage_upload_create import ObjectStorageUploadCreate as ObjectStorageUploadCreate -from saturn_api.models.object_storage_upload_list import ObjectStorageUploadList as ObjectStorageUploadList -from saturn_api.models.object_storage_usage_stats import ObjectStorageUsageStats as ObjectStorageUsageStats +from saturn_api.models.object_storage_presigned_download import ( + ObjectStoragePresignedDownload as ObjectStoragePresignedDownload, +) +from saturn_api.models.object_storage_presigned_part import ( + ObjectStoragePresignedPart as ObjectStoragePresignedPart, +) +from saturn_api.models.object_storage_presigned_upload import ( + ObjectStoragePresignedUpload as ObjectStoragePresignedUpload, +) +from saturn_api.models.object_storage_reference import ( + ObjectStorageReference as ObjectStorageReference, +) +from saturn_api.models.object_storage_shared_owner import ( + ObjectStorageSharedOwner as ObjectStorageSharedOwner, +) +from saturn_api.models.object_storage_shared_owner_list import ( + ObjectStorageSharedOwnerList as ObjectStorageSharedOwnerList, +) +from saturn_api.models.object_storage_upload import ( + ObjectStorageUpload as ObjectStorageUpload, +) +from saturn_api.models.object_storage_upload_create import ( + ObjectStorageUploadCreate as ObjectStorageUploadCreate, +) +from saturn_api.models.object_storage_upload_list import ( + ObjectStorageUploadList as ObjectStorageUploadList, +) +from saturn_api.models.object_storage_usage_stats import ( + ObjectStorageUsageStats as ObjectStorageUsageStats, +) from saturn_api.models.org import Org as Org from saturn_api.models.org_create import OrgCreate as OrgCreate from saturn_api.models.org_invitation import OrgInvitation as OrgInvitation -from saturn_api.models.org_invitation_create import OrgInvitationCreate as OrgInvitationCreate +from saturn_api.models.org_invitation_create import ( + OrgInvitationCreate as OrgInvitationCreate, +) from saturn_api.models.org_invitation_list import OrgInvitationList as OrgInvitationList -from saturn_api.models.org_invitation_update import OrgInvitationUpdate as OrgInvitationUpdate +from saturn_api.models.org_invitation_update import ( + OrgInvitationUpdate as OrgInvitationUpdate, +) from saturn_api.models.org_list import OrgList as OrgList from saturn_api.models.org_member_create import OrgMemberCreate as OrgMemberCreate from saturn_api.models.org_member_update import OrgMemberUpdate as OrgMemberUpdate from saturn_api.models.org_update import OrgUpdate as OrgUpdate -from saturn_api.models.orgs_list_owners200_response import OrgsListOwners200Response as OrgsListOwners200Response +from saturn_api.models.orgs_list_owners200_response import ( + OrgsListOwners200Response as OrgsListOwners200Response, +) from saturn_api.models.owner import Owner as Owner from saturn_api.models.owner_by_id import OwnerById as OwnerById -from saturn_api.models.owner_by_identity_id import OwnerByIdentityId as OwnerByIdentityId +from saturn_api.models.owner_by_identity_id import ( + OwnerByIdentityId as OwnerByIdentityId, +) from saturn_api.models.owner_by_name import OwnerByName as OwnerByName from saturn_api.models.owner_detailed import OwnerDetailed as OwnerDetailed from saturn_api.models.owner_detailed_list import OwnerDetailedList as OwnerDetailedList @@ -572,27 +739,39 @@ from saturn_api.models.pod_history import PodHistory as PodHistory from saturn_api.models.pod_logs import PodLogs as PodLogs from saturn_api.models.pod_runtime_summary import PodRuntimeSummary as PodRuntimeSummary -from saturn_api.models.pod_runtime_summary_list import PodRuntimeSummaryList as PodRuntimeSummaryList +from saturn_api.models.pod_runtime_summary_list import ( + PodRuntimeSummaryList as PodRuntimeSummaryList, +) from saturn_api.models.pod_status import PodStatus as PodStatus from saturn_api.models.recipe import Recipe as Recipe from saturn_api.models.recipe_list import RecipeList as RecipeList from saturn_api.models.resource import Resource as Resource -from saturn_api.models.resource_by_deployment_id import ResourceByDeploymentId as ResourceByDeploymentId +from saturn_api.models.resource_by_deployment_id import ( + ResourceByDeploymentId as ResourceByDeploymentId, +) from saturn_api.models.resource_by_job_id import ResourceByJobId as ResourceByJobId -from saturn_api.models.resource_by_workspace_id import ResourceByWorkspaceId as ResourceByWorkspaceId +from saturn_api.models.resource_by_workspace_id import ( + ResourceByWorkspaceId as ResourceByWorkspaceId, +) from saturn_api.models.resource_clusters import ResourceClusters as ResourceClusters from saturn_api.models.resource_history import ResourceHistory as ResourceHistory from saturn_api.models.resource_recipe import ResourceRecipe as ResourceRecipe from saturn_api.models.resource_reference import ResourceReference as ResourceReference from saturn_api.models.resource_state import ResourceState as ResourceState from saturn_api.models.resource_template import ResourceTemplate as ResourceTemplate -from saturn_api.models.resource_template_access_level import ResourceTemplateAccessLevel as ResourceTemplateAccessLevel +from saturn_api.models.resource_template_access_level import ( + ResourceTemplateAccessLevel as ResourceTemplateAccessLevel, +) from saturn_api.models.resource_token_info import ResourceTokenInfo as ResourceTokenInfo -from saturn_api.models.resource_token_update import ResourceTokenUpdate as ResourceTokenUpdate +from saturn_api.models.resource_token_update import ( + ResourceTokenUpdate as ResourceTokenUpdate, +) from saturn_api.models.resource_type import ResourceType as ResourceType from saturn_api.models.restart_policy import RestartPolicy as RestartPolicy from saturn_api.models.route import Route as Route -from saturn_api.models.route_by_container_port import RouteByContainerPort as RouteByContainerPort +from saturn_api.models.route_by_container_port import ( + RouteByContainerPort as RouteByContainerPort, +) from saturn_api.models.route_by_id import RouteById as RouteById from saturn_api.models.route_by_subdomain import RouteBySubdomain as RouteBySubdomain from saturn_api.models.route_create import RouteCreate as RouteCreate @@ -600,48 +779,102 @@ from saturn_api.models.route_reference import RouteReference as RouteReference from saturn_api.models.route_state import RouteState as RouteState from saturn_api.models.route_update import RouteUpdate as RouteUpdate -from saturn_api.models.ssh_private_key import SSHPrivateKey as SSHPrivateKey -from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate as SSHPrivateKeyCreate -from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList as SSHPrivateKeyList -from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial as SSHPrivateKeyPartial -from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate as SSHPrivateKeyUpdate -from saturn_api.models.ssh_public_key import SSHPublicKey as SSHPublicKey -from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate as SSHPublicKeyCreate -from saturn_api.models.ssh_public_key_list import SSHPublicKeyList as SSHPublicKeyList -from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate as SSHPublicKeyUpdate from saturn_api.models.secret import Secret as Secret from saturn_api.models.secret_access_level import SecretAccessLevel as SecretAccessLevel from saturn_api.models.secret_attachment import SecretAttachment as SecretAttachment -from saturn_api.models.secret_attachment_create import SecretAttachmentCreate as SecretAttachmentCreate -from saturn_api.models.secret_attachment_list import SecretAttachmentList as SecretAttachmentList -from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe as SecretAttachmentRecipe -from saturn_api.models.secret_attachment_type import SecretAttachmentType as SecretAttachmentType -from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate as SecretAttachmentUpdate +from saturn_api.models.secret_attachment_create import ( + SecretAttachmentCreate as SecretAttachmentCreate, +) +from saturn_api.models.secret_attachment_list import ( + SecretAttachmentList as SecretAttachmentList, +) +from saturn_api.models.secret_attachment_recipe import ( + SecretAttachmentRecipe as SecretAttachmentRecipe, +) +from saturn_api.models.secret_attachment_type import ( + SecretAttachmentType as SecretAttachmentType, +) +from saturn_api.models.secret_attachment_update import ( + SecretAttachmentUpdate as SecretAttachmentUpdate, +) from saturn_api.models.secret_create import SecretCreate as SecretCreate from saturn_api.models.secret_list import SecretList as SecretList from saturn_api.models.secret_update import SecretUpdate as SecretUpdate from saturn_api.models.server_options import ServerOptions as ServerOptions from saturn_api.models.server_options_size import ServerOptionsSize as ServerOptionsSize from saturn_api.models.service_account import ServiceAccount as ServiceAccount -from saturn_api.models.service_account_attachment import ServiceAccountAttachment as ServiceAccountAttachment -from saturn_api.models.service_account_create import ServiceAccountCreate as ServiceAccountCreate -from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment as ServiceAccountCreateAttachment -from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement as ServiceAccountEntitlement -from saturn_api.models.service_account_entitlement_create import ServiceAccountEntitlementCreate as ServiceAccountEntitlementCreate -from saturn_api.models.service_account_entitlement_list import ServiceAccountEntitlementList as ServiceAccountEntitlementList -from saturn_api.models.service_account_list import ServiceAccountList as ServiceAccountList -from saturn_api.models.service_account_update import ServiceAccountUpdate as ServiceAccountUpdate +from saturn_api.models.service_account_attachment import ( + ServiceAccountAttachment as ServiceAccountAttachment, +) +from saturn_api.models.service_account_create import ( + ServiceAccountCreate as ServiceAccountCreate, +) +from saturn_api.models.service_account_create_attachment import ( + ServiceAccountCreateAttachment as ServiceAccountCreateAttachment, +) +from saturn_api.models.service_account_entitlement import ( + ServiceAccountEntitlement as ServiceAccountEntitlement, +) +from saturn_api.models.service_account_entitlement_create import ( + ServiceAccountEntitlementCreate as ServiceAccountEntitlementCreate, +) +from saturn_api.models.service_account_entitlement_list import ( + ServiceAccountEntitlementList as ServiceAccountEntitlementList, +) +from saturn_api.models.service_account_list import ( + ServiceAccountList as ServiceAccountList, +) +from saturn_api.models.service_account_update import ( + ServiceAccountUpdate as ServiceAccountUpdate, +) from saturn_api.models.shared_access_mode import SharedAccessMode as SharedAccessMode from saturn_api.models.shared_folder import SharedFolder as SharedFolder -from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel as SharedFolderAccessLevel -from saturn_api.models.shared_folder_attachment import SharedFolderAttachment as SharedFolderAttachment -from saturn_api.models.shared_folder_attachment_create import SharedFolderAttachmentCreate as SharedFolderAttachmentCreate -from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList as SharedFolderAttachmentList -from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe as SharedFolderAttachmentRecipe -from saturn_api.models.shared_folder_attachment_update import SharedFolderAttachmentUpdate as SharedFolderAttachmentUpdate -from saturn_api.models.shared_folder_create import SharedFolderCreate as SharedFolderCreate +from saturn_api.models.shared_folder_access_level import ( + SharedFolderAccessLevel as SharedFolderAccessLevel, +) +from saturn_api.models.shared_folder_attachment import ( + SharedFolderAttachment as SharedFolderAttachment, +) +from saturn_api.models.shared_folder_attachment_create import ( + SharedFolderAttachmentCreate as SharedFolderAttachmentCreate, +) +from saturn_api.models.shared_folder_attachment_list import ( + SharedFolderAttachmentList as SharedFolderAttachmentList, +) +from saturn_api.models.shared_folder_attachment_recipe import ( + SharedFolderAttachmentRecipe as SharedFolderAttachmentRecipe, +) +from saturn_api.models.shared_folder_attachment_update import ( + SharedFolderAttachmentUpdate as SharedFolderAttachmentUpdate, +) +from saturn_api.models.shared_folder_create import ( + SharedFolderCreate as SharedFolderCreate, +) from saturn_api.models.shared_folder_list import SharedFolderList as SharedFolderList -from saturn_api.models.shared_folder_update import SharedFolderUpdate as SharedFolderUpdate +from saturn_api.models.shared_folder_update import ( + SharedFolderUpdate as SharedFolderUpdate, +) +from saturn_api.models.ssh_private_key import SSHPrivateKey as SSHPrivateKey +from saturn_api.models.ssh_private_key_create import ( + SSHPrivateKeyCreate as SSHPrivateKeyCreate, +) +from saturn_api.models.ssh_private_key_list import ( + SSHPrivateKeyList as SSHPrivateKeyList, +) +from saturn_api.models.ssh_private_key_partial import ( + SSHPrivateKeyPartial as SSHPrivateKeyPartial, +) +from saturn_api.models.ssh_private_key_update import ( + SSHPrivateKeyUpdate as SSHPrivateKeyUpdate, +) +from saturn_api.models.ssh_public_key import SSHPublicKey as SSHPublicKey +from saturn_api.models.ssh_public_key_create import ( + SSHPublicKeyCreate as SSHPublicKeyCreate, +) +from saturn_api.models.ssh_public_key_list import SSHPublicKeyList as SSHPublicKeyList +from saturn_api.models.ssh_public_key_update import ( + SSHPublicKeyUpdate as SSHPublicKeyUpdate, +) from saturn_api.models.stats import Stats as Stats from saturn_api.models.usage_limits import UsageLimits as UsageLimits from saturn_api.models.usage_limits_create import UsageLimitsCreate as UsageLimitsCreate @@ -655,26 +888,43 @@ from saturn_api.models.user_list import UserList as UserList from saturn_api.models.user_owner_list import UserOwnerList as UserOwnerList from saturn_api.models.user_preferences import UserPreferences as UserPreferences -from saturn_api.models.user_preferences_update import UserPreferencesUpdate as UserPreferencesUpdate +from saturn_api.models.user_preferences_update import ( + UserPreferencesUpdate as UserPreferencesUpdate, +) from saturn_api.models.user_update import UserUpdate as UserUpdate -from saturn_api.models.users_get200_response import UsersGet200Response as UsersGet200Response -from saturn_api.models.users_list200_response import UsersList200Response as UsersList200Response +from saturn_api.models.users_get200_response import ( + UsersGet200Response as UsersGet200Response, +) +from saturn_api.models.users_list200_response import ( + UsersList200Response as UsersList200Response, +) from saturn_api.models.viewer import Viewer as Viewer from saturn_api.models.viewer_create import ViewerCreate as ViewerCreate from saturn_api.models.viewer_list import ViewerList as ViewerList from saturn_api.models.viewer_recipe import ViewerRecipe as ViewerRecipe -from saturn_api.models.white_label_configuration import WhiteLabelConfiguration as WhiteLabelConfiguration +from saturn_api.models.white_label_configuration import ( + WhiteLabelConfiguration as WhiteLabelConfiguration, +) from saturn_api.models.workload_type import WorkloadType as WorkloadType from saturn_api.models.workspace import Workspace as Workspace from saturn_api.models.workspace_create import WorkspaceCreate as WorkspaceCreate -from saturn_api.models.workspace_ide_default_images import WorkspaceIdeDefaultImages as WorkspaceIdeDefaultImages +from saturn_api.models.workspace_ide_default_images import ( + WorkspaceIdeDefaultImages as WorkspaceIdeDefaultImages, +) from saturn_api.models.workspace_list import WorkspaceList as WorkspaceList from saturn_api.models.workspace_recipe import WorkspaceRecipe as WorkspaceRecipe -from saturn_api.models.workspace_route_recipe import WorkspaceRouteRecipe as WorkspaceRouteRecipe -from saturn_api.models.workspace_runtime_summary import WorkspaceRuntimeSummary as WorkspaceRuntimeSummary -from saturn_api.models.workspace_server_info import WorkspaceServerInfo as WorkspaceServerInfo -from saturn_api.models.workspace_server_options import WorkspaceServerOptions as WorkspaceServerOptions +from saturn_api.models.workspace_route_recipe import ( + WorkspaceRouteRecipe as WorkspaceRouteRecipe, +) +from saturn_api.models.workspace_runtime_summary import ( + WorkspaceRuntimeSummary as WorkspaceRuntimeSummary, +) +from saturn_api.models.workspace_server_info import ( + WorkspaceServerInfo as WorkspaceServerInfo, +) +from saturn_api.models.workspace_server_options import ( + WorkspaceServerOptions as WorkspaceServerOptions, +) from saturn_api.models.workspace_spec import WorkspaceSpec as WorkspaceSpec from saturn_api.models.workspace_start import WorkspaceStart as WorkspaceStart from saturn_api.models.workspace_update import WorkspaceUpdate as WorkspaceUpdate - diff --git a/saturn_api/api/__init__.py b/saturn_api/api/__init__.py index 2032ee9..283362b 100644 --- a/saturn_api/api/__init__.py +++ b/saturn_api/api/__init__.py @@ -4,13 +4,16 @@ from saturn_api.api.active_api import ActiveApi from saturn_api.api.api_status_api import ApiStatusApi from saturn_api.api.api_tokens_api import ApiTokensApi +from saturn_api.api.artifacts_api import ArtifactsApi from saturn_api.api.authorization_api import AuthorizationApi from saturn_api.api.clusters_api import ClustersApi from saturn_api.api.current_user_api import CurrentUserApi from saturn_api.api.dask_clusters_api import DaskClustersApi +from saturn_api.api.datasets_api import DatasetsApi from saturn_api.api.deployments_api import DeploymentsApi from saturn_api.api.external_repo_attachments_api import ExternalRepoAttachmentsApi from saturn_api.api.external_repos_api import ExternalReposApi +from saturn_api.api.fine_tuning_jobs_api import FineTuningJobsApi from saturn_api.api.groups_api import GroupsApi from saturn_api.api.image_tags_api import ImageTagsApi from saturn_api.api.images_api import ImagesApi @@ -23,7 +26,9 @@ from saturn_api.api.orgs_api import OrgsApi from saturn_api.api.recipes_api import RecipesApi from saturn_api.api.secrets_api import SecretsApi -from saturn_api.api.service_account_entitlements_api import ServiceAccountEntitlementsApi +from saturn_api.api.service_account_entitlements_api import ( + ServiceAccountEntitlementsApi, +) from saturn_api.api.service_accounts_api import ServiceAccountsApi from saturn_api.api.shared_folder_attachments_api import SharedFolderAttachmentsApi from saturn_api.api.shared_folders_api import SharedFoldersApi @@ -31,4 +36,3 @@ from saturn_api.api.ssh_public_keys_api import SshPublicKeysApi from saturn_api.api.users_api import UsersApi from saturn_api.api.workspaces_api import WorkspacesApi - diff --git a/saturn_api/api/active_api.py b/saturn_api/api/active_api.py index 586c098..85c821e 100644 --- a/saturn_api/api/active_api.py +++ b/saturn_api/api/active_api.py @@ -1,32 +1,35 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.active_resource_list import ActiveResourceList from saturn_api.models.pod_logs import PodLogs from saturn_api.models.pod_runtime_summary import PodRuntimeSummary from saturn_api.models.pod_runtime_summary_list import PodRuntimeSummaryList from saturn_api.models.resource_type import ResourceType from saturn_api.models.workload_type import WorkloadType - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -42,7 +45,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def get_pod( self, @@ -51,10 +53,7 @@ async def get_pod( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,7 +87,7 @@ async def get_pod( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_serialize( name=name, @@ -96,23 +95,19 @@ async def get_pod( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummary", + "200": "PodRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_pod_with_http_info( self, @@ -121,10 +116,7 @@ async def get_pod_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -158,7 +150,7 @@ async def get_pod_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_serialize( name=name, @@ -166,23 +158,19 @@ async def get_pod_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummary", + "200": "PodRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_pod_without_preload_content( self, @@ -191,10 +179,7 @@ async def get_pod_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -228,7 +213,7 @@ async def get_pod_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_serialize( name=name, @@ -236,19 +221,15 @@ async def get_pod_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummary", + "200": "PodRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_pod_serialize( self, name, @@ -261,48 +242,37 @@ def _get_pod_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if name is not None: - _path_params['name'] = name + _path_params["name"] = name # process the query parameters if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/active/pods/{name}', + method="GET", + resource_path="/api/active/pods/{name}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -312,27 +282,36 @@ def _get_pod_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_pod_logs( self, name: StrictStr, - container_name: Annotated[Optional[StrictStr], Field(description="Name of the container to retrieve logs for. Defaults to first container in the pod.")] = None, - previous: Annotated[Optional[StrictBool], Field(description="Retrieve logs for the previous instance of a container, if it exists.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster where the pod is running.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Number of log lines to retrieve.")] = None, + container_name: Annotated[ + Optional[StrictStr], + Field( + description="Name of the container to retrieve logs for. Defaults to first container in the pod." + ), + ] = None, + previous: Annotated[ + Optional[StrictBool], + Field( + description="Retrieve logs for the previous instance of a container, if it exists." + ), + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster where the pod is running.") + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], + Field(description="Number of log lines to retrieve."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -372,7 +351,7 @@ async def get_pod_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_logs_serialize( name=name, @@ -383,38 +362,46 @@ async def get_pod_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodLogs", + "200": "PodLogs", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_pod_logs_with_http_info( self, name: StrictStr, - container_name: Annotated[Optional[StrictStr], Field(description="Name of the container to retrieve logs for. Defaults to first container in the pod.")] = None, - previous: Annotated[Optional[StrictBool], Field(description="Retrieve logs for the previous instance of a container, if it exists.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster where the pod is running.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Number of log lines to retrieve.")] = None, + container_name: Annotated[ + Optional[StrictStr], + Field( + description="Name of the container to retrieve logs for. Defaults to first container in the pod." + ), + ] = None, + previous: Annotated[ + Optional[StrictBool], + Field( + description="Retrieve logs for the previous instance of a container, if it exists." + ), + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster where the pod is running.") + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], + Field(description="Number of log lines to retrieve."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -454,7 +441,7 @@ async def get_pod_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_logs_serialize( name=name, @@ -465,38 +452,46 @@ async def get_pod_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodLogs", + "200": "PodLogs", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_pod_logs_without_preload_content( self, name: StrictStr, - container_name: Annotated[Optional[StrictStr], Field(description="Name of the container to retrieve logs for. Defaults to first container in the pod.")] = None, - previous: Annotated[Optional[StrictBool], Field(description="Retrieve logs for the previous instance of a container, if it exists.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster where the pod is running.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Number of log lines to retrieve.")] = None, + container_name: Annotated[ + Optional[StrictStr], + Field( + description="Name of the container to retrieve logs for. Defaults to first container in the pod." + ), + ] = None, + previous: Annotated[ + Optional[StrictBool], + Field( + description="Retrieve logs for the previous instance of a container, if it exists." + ), + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster where the pod is running.") + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], + Field(description="Number of log lines to retrieve."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -536,7 +531,7 @@ async def get_pod_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_logs_serialize( name=name, @@ -547,19 +542,15 @@ async def get_pod_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodLogs", + "200": "PodLogs", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_pod_logs_serialize( self, name, @@ -575,60 +566,49 @@ def _get_pod_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if name is not None: - _path_params['name'] = name + _path_params["name"] = name # process the query parameters if container_name is not None: - - _query_params.append(('container_name', container_name)) - + + _query_params.append(("container_name", container_name)) + if previous is not None: - - _query_params.append(('previous', previous)) - + + _query_params.append(("previous", previous)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/active/pods/{name}/logs', + method="GET", + resource_path="/api/active/pods/{name}/logs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -638,28 +618,27 @@ def _get_pod_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_pods( self, workload_type: Annotated[WorkloadType, Field(description="Type of pods to query.")], workload_id: Annotated[StrictStr, Field(description="ID of the workload.")], - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster to query.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster to query.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -701,7 +680,7 @@ async def list_pods( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_pods_serialize( workload_type=workload_type, @@ -713,39 +692,37 @@ async def list_pods( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummaryList", + "200": "PodRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_pods_with_http_info( self, workload_type: Annotated[WorkloadType, Field(description="Type of pods to query.")], workload_id: Annotated[StrictStr, Field(description="ID of the workload.")], - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster to query.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster to query.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -787,7 +764,7 @@ async def list_pods_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_pods_serialize( workload_type=workload_type, @@ -799,39 +776,37 @@ async def list_pods_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummaryList", + "200": "PodRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_pods_without_preload_content( self, workload_type: Annotated[WorkloadType, Field(description="Type of pods to query.")], workload_id: Annotated[StrictStr, Field(description="ID of the workload.")], - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster to query.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster to query.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -873,7 +848,7 @@ async def list_pods_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_pods_serialize( workload_type=workload_type, @@ -885,19 +860,15 @@ async def list_pods_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummaryList", + "200": "PodRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_pods_serialize( self, workload_type, @@ -914,66 +885,55 @@ def _list_pods_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if workload_type is not None: - - _query_params.append(('workload_type', workload_type.value)) - + + _query_params.append(("workload_type", workload_type.value)) + if workload_id is not None: - - _query_params.append(('workload_id', workload_id)) - + + _query_params.append(("workload_id", workload_id)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/active/pods', + method="GET", + resource_path="/api/active/pods", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -983,30 +943,40 @@ def _list_pods_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_resources( self, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - resource_type: Annotated[Optional[ResourceType], Field(description="Filter the type of returned resources.")] = None, - list_by: Annotated[Optional[StrictStr], Field(description="List active resources at the owner, org, or account level. Org and Account require elevated permissions.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + resource_type: Annotated[ + Optional[ResourceType], Field(description="Filter the type of returned resources.") + ] = None, + list_by: Annotated[ + Optional[StrictStr], + Field( + description="List active resources at the owner, org, or account level. Org and Account require elevated permissions." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1052,7 +1022,7 @@ async def list_resources( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_resources_serialize( user_id=user_id, @@ -1066,41 +1036,50 @@ async def list_resources( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActiveResourceList", + "200": "ActiveResourceList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_resources_with_http_info( self, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - resource_type: Annotated[Optional[ResourceType], Field(description="Filter the type of returned resources.")] = None, - list_by: Annotated[Optional[StrictStr], Field(description="List active resources at the owner, org, or account level. Org and Account require elevated permissions.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + resource_type: Annotated[ + Optional[ResourceType], Field(description="Filter the type of returned resources.") + ] = None, + list_by: Annotated[ + Optional[StrictStr], + Field( + description="List active resources at the owner, org, or account level. Org and Account require elevated permissions." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1146,7 +1125,7 @@ async def list_resources_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_resources_serialize( user_id=user_id, @@ -1160,41 +1139,50 @@ async def list_resources_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActiveResourceList", + "200": "ActiveResourceList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_resources_without_preload_content( self, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - resource_type: Annotated[Optional[ResourceType], Field(description="Filter the type of returned resources.")] = None, - list_by: Annotated[Optional[StrictStr], Field(description="List active resources at the owner, org, or account level. Org and Account require elevated permissions.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + resource_type: Annotated[ + Optional[ResourceType], Field(description="Filter the type of returned resources.") + ] = None, + list_by: Annotated[ + Optional[StrictStr], + Field( + description="List active resources at the owner, org, or account level. Org and Account require elevated permissions." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1240,7 +1228,7 @@ async def list_resources_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_resources_serialize( user_id=user_id, @@ -1254,19 +1242,15 @@ async def list_resources_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActiveResourceList", + "200": "ActiveResourceList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_resources_serialize( self, user_id, @@ -1285,74 +1269,63 @@ def _list_resources_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if resource_type is not None: - - _query_params.append(('resource_type', resource_type.value)) - + + _query_params.append(("resource_type", resource_type.value)) + if list_by is not None: - - _query_params.append(('list_by', list_by)) - + + _query_params.append(("list_by", list_by)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/active/resources', + method="GET", + resource_path="/api/active/resources", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1362,7 +1335,5 @@ def _list_resources_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/api_status_api.py b/saturn_api/api/api_status_api.py index 79a140a..014719c 100644 --- a/saturn_api/api/api_status_api.py +++ b/saturn_api/api/api_status_api.py @@ -1,24 +1,22 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from saturn_api.models.api_status import ApiStatus +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.api_status import ApiStatus from saturn_api.rest import RESTResponseType @@ -34,17 +32,13 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def get( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -74,39 +68,32 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiStatus", + "200": "ApiStatus", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -136,39 +123,32 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiStatus", + "200": "ApiStatus", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -198,25 +178,21 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiStatus", + "200": "ApiStatus", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, _request_auth, @@ -227,16 +203,13 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -245,24 +218,16 @@ def _get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/status', + method="GET", + resource_path="/api/status", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -272,7 +237,5 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/api_tokens_api.py b/saturn_api/api/api_tokens_api.py index ee9e2db..2013fe2 100644 --- a/saturn_api/api/api_tokens_api.py +++ b/saturn_api/api/api_tokens_api.py @@ -1,31 +1,34 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.api_token import ApiToken from saturn_api.models.api_token_create import ApiTokenCreate from saturn_api.models.api_token_info import ApiTokenInfo from saturn_api.models.api_token_list import ApiTokenList from saturn_api.models.api_token_update import ApiTokenUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -41,7 +44,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -49,10 +51,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,30 +84,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( api_token_create=api_token_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiToken", + "201": "ApiToken", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -116,10 +111,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,30 +144,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( api_token_create=api_token_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiToken", + "201": "ApiToken", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -183,10 +171,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,26 +204,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( api_token_create=api_token_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiToken", + "201": "ApiToken", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, api_token_create, @@ -250,16 +231,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,37 +248,24 @@ def _create_serialize( if api_token_create is not None: _body_params = api_token_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/tokens', + method="POST", + resource_path="/api/tokens", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -310,12 +275,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -323,10 +285,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -359,30 +318,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -390,10 +345,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -426,30 +378,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -457,10 +405,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -493,26 +438,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, api_token_id, @@ -524,37 +465,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if api_token_id is not None: - _path_params['api_token_id'] = api_token_id + _path_params["api_token_id"] = api_token_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/tokens/{api_token_id}', + method="DELETE", + resource_path="/api/tokens/{api_token_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -564,12 +497,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -577,10 +507,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -613,30 +540,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenInfo", + "200": "ApiTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -644,10 +567,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -680,30 +600,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenInfo", + "200": "ApiTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -711,10 +627,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -747,26 +660,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( api_token_id=api_token_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenInfo", + "200": "ApiTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, api_token_id, @@ -778,44 +687,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if api_token_id is not None: - _path_params['api_token_id'] = api_token_id + _path_params["api_token_id"] = api_token_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/tokens/{api_token_id}', + method="GET", + resource_path="/api/tokens/{api_token_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -825,29 +723,35 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -892,7 +796,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -905,40 +809,45 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenList", + "200": "ApiTokenList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -983,7 +892,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -996,40 +905,45 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenList", + "200": "ApiTokenList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1074,7 +988,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1087,19 +1001,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenList", + "200": "ApiTokenList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, user_id, @@ -1117,70 +1027,59 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if identity is not None: - - _query_params.append(('identity', identity)) - + + _query_params.append(("identity", identity)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/tokens', + method="GET", + resource_path="/api/tokens", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1190,12 +1089,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1204,10 +1100,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1242,7 +1135,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( api_token_id=api_token_id, @@ -1250,23 +1143,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenInfo", + "200": "ApiTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1275,10 +1164,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1313,7 +1199,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( api_token_id=api_token_id, @@ -1321,23 +1207,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenInfo", + "200": "ApiTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1346,10 +1228,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1384,7 +1263,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( api_token_id=api_token_id, @@ -1392,19 +1271,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiTokenInfo", + "200": "ApiTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, api_token_id, @@ -1417,21 +1292,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if api_token_id is not None: - _path_params['api_token_id'] = api_token_id + _path_params["api_token_id"] = api_token_id # process the query parameters # process the header parameters # process the form parameters @@ -1439,37 +1311,24 @@ def _update_serialize( if api_token_update is not None: _body_params = api_token_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/tokens/{api_token_id}', + method="PATCH", + resource_path="/api/tokens/{api_token_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1479,7 +1338,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/artifacts_api.py b/saturn_api/api/artifacts_api.py new file mode 100644 index 0000000..47c3101 --- /dev/null +++ b/saturn_api/api/artifacts_api.py @@ -0,0 +1,1360 @@ +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Dict, List, Optional, Tuple, Union + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse +from saturn_api.models.artifact import Artifact +from saturn_api.models.artifact_create import ArtifactCreate +from saturn_api.models.artifact_kind import ArtifactKind +from saturn_api.models.artifact_list import ArtifactList +from saturn_api.models.artifact_update import ArtifactUpdate +from saturn_api.rest import RESTResponseType + + +class ArtifactsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + async def create( + self, + org_id: StrictStr, + artifact_create: ArtifactCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Artifact: + """Create artifact + + Create a new artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_create: (required) + :type artifact_create: ArtifactCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + artifact_create=artifact_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def create_with_http_info( + self, + org_id: StrictStr, + artifact_create: ArtifactCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Artifact]: + """Create artifact + + Create a new artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_create: (required) + :type artifact_create: ArtifactCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + artifact_create=artifact_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def create_without_preload_content( + self, + org_id: StrictStr, + artifact_create: ArtifactCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create artifact + + Create a new artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_create: (required) + :type artifact_create: ArtifactCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + artifact_create=artifact_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_serialize( + self, + org_id, + artifact_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if artifact_create is not None: + _body_params = artifact_create + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/artifacts", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def delete( + self, + org_id: StrictStr, + artifact_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete artifact + + Delete an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + artifact_id=artifact_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def delete_with_http_info( + self, + org_id: StrictStr, + artifact_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete artifact + + Delete an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + artifact_id=artifact_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def delete_without_preload_content( + self, + org_id: StrictStr, + artifact_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete artifact + + Delete an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + artifact_id=artifact_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_serialize( + self, + org_id, + artifact_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if artifact_id is not None: + _path_params["artifact_id"] = artifact_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/orgs/{org_id}/artifacts/{artifact_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def get( + self, + org_id: StrictStr, + artifact_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Artifact: + """Get artifact + + Get an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + artifact_id=artifact_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def get_with_http_info( + self, + org_id: StrictStr, + artifact_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Artifact]: + """Get artifact + + Get an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + artifact_id=artifact_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def get_without_preload_content( + self, + org_id: StrictStr, + artifact_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get artifact + + Get an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + artifact_id=artifact_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_serialize( + self, + org_id, + artifact_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if artifact_id is not None: + _path_params["artifact_id"] = artifact_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/artifacts/{artifact_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def list( + self, + org_id: StrictStr, + kind: Annotated[ + Optional[ArtifactKind], Field(description="Filter artifacts by kind.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactList: + """List artifacts + + Paginated list of artifacts. + + :param org_id: (required) + :type org_id: str + :param kind: Filter artifacts by kind. + :type kind: ArtifactKind + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + kind=kind, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ArtifactList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def list_with_http_info( + self, + org_id: StrictStr, + kind: Annotated[ + Optional[ArtifactKind], Field(description="Filter artifacts by kind.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactList]: + """List artifacts + + Paginated list of artifacts. + + :param org_id: (required) + :type org_id: str + :param kind: Filter artifacts by kind. + :type kind: ArtifactKind + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + kind=kind, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ArtifactList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def list_without_preload_content( + self, + org_id: StrictStr, + kind: Annotated[ + Optional[ArtifactKind], Field(description="Filter artifacts by kind.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List artifacts + + Paginated list of artifacts. + + :param org_id: (required) + :type org_id: str + :param kind: Filter artifacts by kind. + :type kind: ArtifactKind + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + kind=kind, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ArtifactList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_serialize( + self, + org_id, + kind, + prev_key, + next_key, + page_size, + descending, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + if kind is not None: + + _query_params.append(("kind", kind.value)) + + if prev_key is not None: + + _query_params.append(("prev_key", prev_key)) + + if next_key is not None: + + _query_params.append(("next_key", next_key)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + if descending is not None: + + _query_params.append(("descending", descending)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/artifacts", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def update( + self, + org_id: StrictStr, + artifact_id: StrictStr, + artifact_update: ArtifactUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Artifact: + """Update artifact + + Update an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param artifact_update: (required) + :type artifact_update: ArtifactUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + org_id=org_id, + artifact_id=artifact_id, + artifact_update=artifact_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def update_with_http_info( + self, + org_id: StrictStr, + artifact_id: StrictStr, + artifact_update: ArtifactUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Artifact]: + """Update artifact + + Update an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param artifact_update: (required) + :type artifact_update: ArtifactUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + org_id=org_id, + artifact_id=artifact_id, + artifact_update=artifact_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def update_without_preload_content( + self, + org_id: StrictStr, + artifact_id: StrictStr, + artifact_update: ArtifactUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update artifact + + Update an artifact. + + :param org_id: (required) + :type org_id: str + :param artifact_id: (required) + :type artifact_id: str + :param artifact_update: (required) + :type artifact_update: ArtifactUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + org_id=org_id, + artifact_id=artifact_id, + artifact_update=artifact_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Artifact", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_serialize( + self, + org_id, + artifact_id, + artifact_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if artifact_id is not None: + _path_params["artifact_id"] = artifact_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if artifact_update is not None: + _body_params = artifact_update + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/orgs/{org_id}/artifacts/{artifact_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/saturn_api/api/authorization_api.py b/saturn_api/api/authorization_api.py index 6f77a2d..0fac217 100644 --- a/saturn_api/api/authorization_api.py +++ b/saturn_api/api/authorization_api.py @@ -1,29 +1,31 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated -from saturn_api.models.authorization_grant import AuthorizationGrant -from saturn_api.models.authorization_token_response import AuthorizationTokenResponse -from saturn_api.models.login import Login from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.authorization_grant import AuthorizationGrant +from saturn_api.models.authorization_token_response import AuthorizationTokenResponse +from saturn_api.models.login import Login from saturn_api.rest import RESTResponseType @@ -39,7 +41,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create_oauth_token( self, @@ -47,10 +48,7 @@ async def create_oauth_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,30 +81,26 @@ async def create_oauth_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_oauth_token_serialize( authorization_grant=authorization_grant, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AuthorizationTokenResponse", + "200": "AuthorizationTokenResponse", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_oauth_token_with_http_info( self, @@ -114,10 +108,7 @@ async def create_oauth_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,30 +141,26 @@ async def create_oauth_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_oauth_token_serialize( authorization_grant=authorization_grant, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AuthorizationTokenResponse", + "200": "AuthorizationTokenResponse", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_oauth_token_without_preload_content( self, @@ -181,10 +168,7 @@ async def create_oauth_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,26 +201,22 @@ async def create_oauth_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_oauth_token_serialize( authorization_grant=authorization_grant, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AuthorizationTokenResponse", + "200": "AuthorizationTokenResponse", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_oauth_token_serialize( self, authorization_grant, @@ -248,16 +228,13 @@ def _create_oauth_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -268,37 +245,24 @@ def _create_oauth_token_serialize( if authorization_grant is not None: _body_params = authorization_grant - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/auth/token', + method="POST", + resource_path="/api/auth/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -308,28 +272,30 @@ def _create_oauth_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_oauth_init( self, - response_type: Annotated[StrictStr, Field(description="OAuth response type. Only 'code' is supported.")], + response_type: Annotated[ + StrictStr, Field(description="OAuth response type. Only 'code' is supported.") + ], client_id: Annotated[StrictStr, Field(description="Saturn OAuth client ID")], code_challenge: Annotated[StrictStr, Field(description="OAuth code challenge.")], - redirect_uri: Annotated[StrictStr, Field(description="URI for redirect with code challenge response.")], - code_challenge_method: Annotated[Optional[StrictStr], Field(description="OAuth code challenge method.")] = None, - state: Annotated[Optional[StrictStr], Field(description="OAuth code challenge state.")] = None, + redirect_uri: Annotated[ + StrictStr, Field(description="URI for redirect with code challenge response.") + ], + code_challenge_method: Annotated[ + Optional[StrictStr], Field(description="OAuth code challenge method.") + ] = None, + state: Annotated[ + Optional[StrictStr], Field(description="OAuth code challenge state.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -372,7 +338,7 @@ async def get_oauth_init( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_oauth_init_serialize( response_type=response_type, @@ -384,39 +350,40 @@ async def get_oauth_init( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '302': None, + "302": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_oauth_init_with_http_info( self, - response_type: Annotated[StrictStr, Field(description="OAuth response type. Only 'code' is supported.")], + response_type: Annotated[ + StrictStr, Field(description="OAuth response type. Only 'code' is supported.") + ], client_id: Annotated[StrictStr, Field(description="Saturn OAuth client ID")], code_challenge: Annotated[StrictStr, Field(description="OAuth code challenge.")], - redirect_uri: Annotated[StrictStr, Field(description="URI for redirect with code challenge response.")], - code_challenge_method: Annotated[Optional[StrictStr], Field(description="OAuth code challenge method.")] = None, - state: Annotated[Optional[StrictStr], Field(description="OAuth code challenge state.")] = None, + redirect_uri: Annotated[ + StrictStr, Field(description="URI for redirect with code challenge response.") + ], + code_challenge_method: Annotated[ + Optional[StrictStr], Field(description="OAuth code challenge method.") + ] = None, + state: Annotated[ + Optional[StrictStr], Field(description="OAuth code challenge state.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -459,7 +426,7 @@ async def get_oauth_init_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_oauth_init_serialize( response_type=response_type, @@ -471,39 +438,40 @@ async def get_oauth_init_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '302': None, + "302": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_oauth_init_without_preload_content( self, - response_type: Annotated[StrictStr, Field(description="OAuth response type. Only 'code' is supported.")], + response_type: Annotated[ + StrictStr, Field(description="OAuth response type. Only 'code' is supported.") + ], client_id: Annotated[StrictStr, Field(description="Saturn OAuth client ID")], code_challenge: Annotated[StrictStr, Field(description="OAuth code challenge.")], - redirect_uri: Annotated[StrictStr, Field(description="URI for redirect with code challenge response.")], - code_challenge_method: Annotated[Optional[StrictStr], Field(description="OAuth code challenge method.")] = None, - state: Annotated[Optional[StrictStr], Field(description="OAuth code challenge state.")] = None, + redirect_uri: Annotated[ + StrictStr, Field(description="URI for redirect with code challenge response.") + ], + code_challenge_method: Annotated[ + Optional[StrictStr], Field(description="OAuth code challenge method.") + ] = None, + state: Annotated[ + Optional[StrictStr], Field(description="OAuth code challenge state.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -546,7 +514,7 @@ async def get_oauth_init_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_oauth_init_serialize( response_type=response_type, @@ -558,19 +526,15 @@ async def get_oauth_init_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '302': None, + "302": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_oauth_init_serialize( self, response_type, @@ -587,59 +551,51 @@ def _get_oauth_init_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if response_type is not None: - - _query_params.append(('response_type', response_type)) - + + _query_params.append(("response_type", response_type)) + if client_id is not None: - - _query_params.append(('client_id', client_id)) - + + _query_params.append(("client_id", client_id)) + if code_challenge is not None: - - _query_params.append(('code_challenge', code_challenge)) - + + _query_params.append(("code_challenge", code_challenge)) + if code_challenge_method is not None: - - _query_params.append(('code_challenge_method', code_challenge_method)) - + + _query_params.append(("code_challenge_method", code_challenge_method)) + if redirect_uri is not None: - - _query_params.append(('redirect_uri', redirect_uri)) - + + _query_params.append(("redirect_uri", redirect_uri)) + if state is not None: - - _query_params.append(('state', state)) - + + _query_params.append(("state", state)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/auth/token', + method="GET", + resource_path="/api/auth/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -649,12 +605,9 @@ def _get_oauth_init_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def login( self, @@ -662,10 +615,7 @@ async def login( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -698,30 +648,26 @@ async def login( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( login=login, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def login_with_http_info( self, @@ -729,10 +675,7 @@ async def login_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -765,30 +708,26 @@ async def login_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( login=login, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def login_without_preload_content( self, @@ -796,10 +735,7 @@ async def login_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -832,26 +768,22 @@ async def login_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( login=login, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _login_serialize( self, login, @@ -863,16 +795,13 @@ def _login_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -883,30 +812,20 @@ def _login_serialize( if login is not None: _body_params = login - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/auth/login', + method="POST", + resource_path="/api/auth/login", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -916,22 +835,16 @@ def _login_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def logout( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -962,39 +875,32 @@ async def logout( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '302': None, + "302": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def logout_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1025,39 +931,32 @@ async def logout_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '302': None, + "302": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def logout_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1088,25 +987,21 @@ async def logout_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '302': None, + "302": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _logout_serialize( self, _request_auth, @@ -1117,16 +1012,13 @@ def _logout_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1135,17 +1027,12 @@ def _logout_serialize( # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/auth/logout', + method="GET", + resource_path="/api/auth/logout", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1155,7 +1042,5 @@ def _logout_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/clusters_api.py b/saturn_api/api/clusters_api.py index 3a9b801..dc62935 100644 --- a/saturn_api/api/clusters_api.py +++ b/saturn_api/api/clusters_api.py @@ -1,30 +1,25 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.cluster import Cluster from saturn_api.models.cluster_create import ClusterCreate from saturn_api.models.cluster_list import ClusterList from saturn_api.models.cluster_update import ClusterUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,7 +35,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +42,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +75,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( cluster_create=cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Cluster", + "201": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +102,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +135,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( cluster_create=cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Cluster", + "201": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +162,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +195,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( cluster_create=cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Cluster", + "201": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, cluster_create, @@ -249,16 +222,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +239,24 @@ def _create_serialize( if cluster_create is not None: _body_params = cluster_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/clusters', + method="POST", + resource_path="/api/clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +266,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +276,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +309,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +336,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +369,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +396,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +429,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, cluster_id, @@ -523,37 +456,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if cluster_id is not None: - _path_params['cluster_id'] = cluster_id + _path_params["cluster_id"] = cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/clusters/{cluster_id}', + method="DELETE", + resource_path="/api/clusters/{cluster_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +488,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +498,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +531,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cluster", + "200": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +558,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +591,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cluster", + "200": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +618,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +651,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( cluster_id=cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cluster", + "200": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, cluster_id, @@ -777,44 +678,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if cluster_id is not None: - _path_params['cluster_id'] = cluster_id + _path_params["cluster_id"] = cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/clusters/{cluster_id}', + method="GET", + resource_path="/api/clusters/{cluster_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,28 +714,31 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - org_id: Annotated[Optional[StrictStr], Field(description="Filter clusters by org ID.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring search on cluster name.")] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Filter clusters by org ID.") + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring search on cluster name.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -888,7 +781,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( org_id=org_id, @@ -900,39 +793,41 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClusterList", + "200": "ClusterList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - org_id: Annotated[Optional[StrictStr], Field(description="Filter clusters by org ID.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring search on cluster name.")] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Filter clusters by org ID.") + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring search on cluster name.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -975,7 +870,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( org_id=org_id, @@ -987,39 +882,41 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClusterList", + "200": "ClusterList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - org_id: Annotated[Optional[StrictStr], Field(description="Filter clusters by org ID.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring search on cluster name.")] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Filter clusters by org ID.") + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring search on cluster name.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1062,7 +959,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( org_id=org_id, @@ -1074,19 +971,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClusterList", + "200": "ClusterList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, org_id, @@ -1103,66 +996,55 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/clusters', + method="GET", + resource_path="/api/clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1172,12 +1054,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1186,10 +1065,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1224,7 +1100,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( cluster_id=cluster_id, @@ -1232,23 +1108,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cluster", + "200": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1257,10 +1129,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1295,7 +1164,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( cluster_id=cluster_id, @@ -1303,23 +1172,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cluster", + "200": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1328,10 +1193,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1366,7 +1228,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( cluster_id=cluster_id, @@ -1374,19 +1236,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cluster", + "200": "Cluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, cluster_id, @@ -1399,21 +1257,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if cluster_id is not None: - _path_params['cluster_id'] = cluster_id + _path_params["cluster_id"] = cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -1421,37 +1276,24 @@ def _update_serialize( if cluster_update is not None: _body_params = cluster_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/clusters/{cluster_id}', + method="PATCH", + resource_path="/api/clusters/{cluster_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1461,7 +1303,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/current_user_api.py b/saturn_api/api/current_user_api.py index 776a4dc..bdd0708 100644 --- a/saturn_api/api/current_user_api.py +++ b/saturn_api/api/current_user_api.py @@ -1,33 +1,28 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.user_detailed import UserDetailed from saturn_api.models.user_owner_list import UserOwnerList from saturn_api.models.user_preferences import UserPreferences from saturn_api.models.user_preferences_update import UserPreferencesUpdate from saturn_api.models.user_update import UserUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -43,17 +38,13 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def delete( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,39 +74,32 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -145,39 +129,32 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -207,25 +184,21 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, _request_auth, @@ -236,16 +209,13 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -254,17 +224,12 @@ def _delete_serialize( # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/user', + method="DELETE", + resource_path="/api/user", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -274,22 +239,16 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,40 +278,33 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", - '204': None, + "200": "UserDetailed", + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -382,40 +334,33 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", - '204': None, + "200": "UserDetailed", + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -445,26 +390,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", - '204': None, + "200": "UserDetailed", + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, _request_auth, @@ -475,16 +416,13 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -493,24 +431,16 @@ def _get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/user', + method="GET", + resource_path="/api/user", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -520,12 +450,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_aggregated_usage( self, @@ -534,10 +461,7 @@ async def get_aggregated_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -572,7 +496,7 @@ async def get_aggregated_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( start=start, @@ -580,23 +504,19 @@ async def get_aggregated_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_aggregated_usage_with_http_info( self, @@ -605,10 +525,7 @@ async def get_aggregated_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -643,7 +560,7 @@ async def get_aggregated_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( start=start, @@ -651,23 +568,19 @@ async def get_aggregated_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_aggregated_usage_without_preload_content( self, @@ -676,10 +589,7 @@ async def get_aggregated_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -714,7 +624,7 @@ async def get_aggregated_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( start=start, @@ -722,19 +632,15 @@ async def get_aggregated_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_aggregated_usage_serialize( self, start, @@ -747,16 +653,13 @@ def _get_aggregated_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -764,51 +667,33 @@ def _get_aggregated_usage_serialize( if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/user/usage/aggregated', + method="GET", + resource_path="/api/user/usage/aggregated", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -818,22 +703,16 @@ def _get_aggregated_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_preferences( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -863,39 +742,32 @@ async def get_preferences( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_preferences_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserPreferences", + "200": "UserPreferences", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_preferences_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -925,39 +797,32 @@ async def get_preferences_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_preferences_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserPreferences", + "200": "UserPreferences", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_preferences_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -987,25 +852,21 @@ async def get_preferences_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_preferences_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserPreferences", + "200": "UserPreferences", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_preferences_serialize( self, _request_auth, @@ -1016,16 +877,13 @@ def _get_preferences_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1034,24 +892,16 @@ def _get_preferences_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/user/preferences', + method="GET", + resource_path="/api/user/preferences", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1061,26 +911,25 @@ def _get_preferences_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_owners( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1118,7 +967,7 @@ async def list_owners( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( prev_key=prev_key, @@ -1128,37 +977,35 @@ async def list_owners( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserOwnerList", + "200": "UserOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_owners_with_http_info( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1196,7 +1043,7 @@ async def list_owners_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( prev_key=prev_key, @@ -1206,37 +1053,35 @@ async def list_owners_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserOwnerList", + "200": "UserOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_owners_without_preload_content( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1274,7 +1119,7 @@ async def list_owners_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( prev_key=prev_key, @@ -1284,19 +1129,15 @@ async def list_owners_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserOwnerList", + "200": "UserOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_owners_serialize( self, prev_key, @@ -1311,58 +1152,47 @@ def _list_owners_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/user/owners', + method="GET", + resource_path="/api/user/owners", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1372,27 +1202,26 @@ def _list_owners_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_owners_0( self, user_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1432,7 +1261,7 @@ async def list_owners_0( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_0_serialize( user_id=user_id, @@ -1443,38 +1272,36 @@ async def list_owners_0( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserOwnerList", + "200": "UserOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_owners_0_with_http_info( self, user_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1514,7 +1341,7 @@ async def list_owners_0_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_0_serialize( user_id=user_id, @@ -1525,38 +1352,36 @@ async def list_owners_0_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserOwnerList", + "200": "UserOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_owners_0_without_preload_content( self, user_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1596,7 +1421,7 @@ async def list_owners_0_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_0_serialize( user_id=user_id, @@ -1607,19 +1432,15 @@ async def list_owners_0_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserOwnerList", + "200": "UserOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_owners_0_serialize( self, user_id, @@ -1635,60 +1456,49 @@ def _list_owners_0_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/users/{user_id}/owners', + method="GET", + resource_path="/api/users/{user_id}/owners", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1698,12 +1508,9 @@ def _list_owners_0_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1711,10 +1518,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1746,30 +1550,26 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_update=user_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", + "200": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1777,10 +1577,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1812,30 +1609,26 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_update=user_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", + "200": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1843,10 +1636,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1878,26 +1668,22 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_update=user_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", + "200": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, user_update, @@ -1909,16 +1695,13 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1929,37 +1712,24 @@ def _update_serialize( if user_update is not None: _body_params = user_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/user', + method="PATCH", + resource_path="/api/user", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1969,12 +1739,9 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_preferences( self, @@ -1982,10 +1749,7 @@ async def update_preferences( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2017,30 +1781,26 @@ async def update_preferences( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_preferences_serialize( user_preferences_update=user_preferences_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserPreferences", + "200": "UserPreferences", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_preferences_with_http_info( self, @@ -2048,10 +1808,7 @@ async def update_preferences_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2083,30 +1840,26 @@ async def update_preferences_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_preferences_serialize( user_preferences_update=user_preferences_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserPreferences", + "200": "UserPreferences", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_preferences_without_preload_content( self, @@ -2114,10 +1867,7 @@ async def update_preferences_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2149,26 +1899,22 @@ async def update_preferences_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_preferences_serialize( user_preferences_update=user_preferences_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserPreferences", + "200": "UserPreferences", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_preferences_serialize( self, user_preferences_update, @@ -2180,16 +1926,13 @@ def _update_preferences_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2200,37 +1943,24 @@ def _update_preferences_serialize( if user_preferences_update is not None: _body_params = user_preferences_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/user/preferences', + method="PATCH", + resource_path="/api/user/preferences", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2240,7 +1970,5 @@ def _update_preferences_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/dask_clusters_api.py b/saturn_api/api/dask_clusters_api.py index 85f16c8..6935694 100644 --- a/saturn_api/api/dask_clusters_api.py +++ b/saturn_api/api/dask_clusters_api.py @@ -1,24 +1,30 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Any, Dict, Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.dask_cluster import DaskCluster from saturn_api.models.dask_cluster_adapt import DaskClusterAdapt from saturn_api.models.dask_cluster_create import DaskClusterCreate @@ -28,7 +34,9 @@ from saturn_api.models.dask_cluster_server_options import DaskClusterServerOptions from saturn_api.models.dask_cluster_update import DaskClusterUpdate from saturn_api.models.dask_components import DaskComponents -from saturn_api.models.dask_worker_runtime_summary_list import DaskWorkerRuntimeSummaryList +from saturn_api.models.dask_worker_runtime_summary_list import ( + DaskWorkerRuntimeSummaryList, +) from saturn_api.models.deployment_runtime_summary import DeploymentRuntimeSummary from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.metrics import Metrics @@ -36,9 +44,6 @@ from saturn_api.models.resource_history import ResourceHistory from saturn_api.models.resource_token_info import ResourceTokenInfo from saturn_api.models.resource_token_update import ResourceTokenUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -54,7 +59,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def adapt( self, @@ -63,10 +67,7 @@ async def adapt( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -100,7 +101,7 @@ async def adapt( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._adapt_serialize( dask_cluster_id=dask_cluster_id, @@ -108,23 +109,19 @@ async def adapt( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def adapt_with_http_info( self, @@ -133,10 +130,7 @@ async def adapt_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -170,7 +164,7 @@ async def adapt_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._adapt_serialize( dask_cluster_id=dask_cluster_id, @@ -178,23 +172,19 @@ async def adapt_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def adapt_without_preload_content( self, @@ -203,10 +193,7 @@ async def adapt_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -240,7 +227,7 @@ async def adapt_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._adapt_serialize( dask_cluster_id=dask_cluster_id, @@ -248,19 +235,15 @@ async def adapt_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _adapt_serialize( self, dask_cluster_id, @@ -273,21 +256,18 @@ def _adapt_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -295,30 +275,20 @@ def _adapt_serialize( if dask_cluster_adapt is not None: _body_params = dask_cluster_adapt - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters/{dask_cluster_id}/adapt', + method="POST", + resource_path="/api/dask_clusters/{dask_cluster_id}/adapt", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -328,12 +298,9 @@ def _adapt_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create( self, @@ -341,10 +308,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -377,30 +341,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( dask_cluster_create=dask_cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DaskCluster", + "201": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -408,10 +368,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -444,30 +401,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( dask_cluster_create=dask_cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DaskCluster", + "201": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -475,10 +428,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -511,26 +461,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( dask_cluster_create=dask_cluster_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DaskCluster", + "201": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, dask_cluster_create, @@ -542,16 +488,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -562,37 +505,24 @@ def _create_serialize( if dask_cluster_create is not None: _body_params = dask_cluster_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters', + method="POST", + resource_path="/api/dask_clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -602,24 +532,21 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, dask_cluster_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete dask cluster that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete dask cluster that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -654,7 +581,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( dask_cluster_id=dask_cluster_id, @@ -662,35 +589,31 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, dask_cluster_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete dask cluster that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete dask cluster that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -725,7 +648,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( dask_cluster_id=dask_cluster_id, @@ -733,35 +656,31 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, dask_cluster_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete dask cluster that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete dask cluster that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -796,7 +715,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( dask_cluster_id=dask_cluster_id, @@ -804,19 +723,15 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, dask_cluster_id, @@ -829,41 +744,33 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters if allow_active is not None: - - _query_params.append(('allow_active', allow_active)) - + + _query_params.append(("allow_active", allow_active)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/dask_clusters/{dask_cluster_id}', + method="DELETE", + resource_path="/api/dask_clusters/{dask_cluster_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -873,12 +780,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -886,10 +790,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -922,30 +823,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -953,10 +850,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -989,30 +883,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -1020,10 +910,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1056,26 +943,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, dask_cluster_id, @@ -1087,44 +970,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1134,12 +1006,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_info( self, @@ -1147,10 +1016,7 @@ async def get_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1182,30 +1048,26 @@ async def get_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_info_with_http_info( self, @@ -1213,10 +1075,7 @@ async def get_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1248,30 +1107,26 @@ async def get_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_info_without_preload_content( self, @@ -1279,10 +1134,7 @@ async def get_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1314,26 +1166,22 @@ async def get_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_info_serialize( self, dask_cluster_id, @@ -1345,44 +1193,33 @@ def _get_info_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/info', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1392,12 +1229,9 @@ def _get_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_kubecluster_runtime_summary( self, @@ -1405,10 +1239,7 @@ async def get_kubecluster_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1441,30 +1272,26 @@ async def get_kubecluster_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_kubecluster_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRuntimeSummary", + "200": "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_kubecluster_runtime_summary_with_http_info( self, @@ -1472,10 +1299,7 @@ async def get_kubecluster_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1508,30 +1332,26 @@ async def get_kubecluster_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_kubecluster_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRuntimeSummary", + "200": "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_kubecluster_runtime_summary_without_preload_content( self, @@ -1539,10 +1359,7 @@ async def get_kubecluster_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1575,26 +1392,22 @@ async def get_kubecluster_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_kubecluster_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRuntimeSummary", + "200": "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_kubecluster_runtime_summary_serialize( self, dask_cluster_id, @@ -1606,44 +1419,33 @@ def _get_kubecluster_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/kubecluster/runtimesummary', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/kubecluster/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1653,29 +1455,32 @@ def _get_kubecluster_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_logs( self, dask_cluster_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1720,7 +1525,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( dask_cluster_id=dask_cluster_id, @@ -1733,40 +1538,42 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_logs_with_http_info( self, dask_cluster_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1811,7 +1618,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( dask_cluster_id=dask_cluster_id, @@ -1824,40 +1631,42 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_logs_without_preload_content( self, dask_cluster_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1902,7 +1711,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( dask_cluster_id=dask_cluster_id, @@ -1915,19 +1724,15 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_serialize( self, dask_cluster_id, @@ -1945,68 +1750,57 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters if pod_name is not None: - - _query_params.append(('pod_name', pod_name)) - + + _query_params.append(("pod_name", pod_name)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if component is not None: - - _query_params.append(('component', component.value)) - + + _query_params.append(("component", component.value)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/logs', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/logs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2016,29 +1810,35 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_metrics( self, dask_cluster_id: StrictStr, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2083,7 +1883,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( dask_cluster_id=dask_cluster_id, @@ -2096,40 +1896,45 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_metrics_with_http_info( self, dask_cluster_id: StrictStr, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2174,7 +1979,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( dask_cluster_id=dask_cluster_id, @@ -2187,40 +1992,45 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_metrics_without_preload_content( self, dask_cluster_id: StrictStr, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2265,7 +2075,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( dask_cluster_id=dask_cluster_id, @@ -2278,19 +2088,15 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_metrics_serialize( self, dask_cluster_id, @@ -2308,86 +2114,65 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters if component is not None: - - _query_params.append(('component', component.value)) - + + _query_params.append(("component", component.value)) + if type is not None: - - _query_params.append(('type', type)) - + + _query_params.append(("type", type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if resolution is not None: - - _query_params.append(('resolution', resolution)) - + + _query_params.append(("resolution", resolution)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/metrics', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/metrics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2397,24 +2182,20 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_pod_history( self, dask_cluster_id: StrictStr, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2449,7 +2230,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( dask_cluster_id=dask_cluster_id, @@ -2457,35 +2238,30 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_pod_history_with_http_info( self, dask_cluster_id: StrictStr, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2520,7 +2296,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( dask_cluster_id=dask_cluster_id, @@ -2528,35 +2304,30 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_pod_history_without_preload_content( self, dask_cluster_id: StrictStr, - component: Annotated[Optional[DaskComponents], Field(description="Dask component to query.")] = None, + component: Annotated[ + Optional[DaskComponents], Field(description="Dask component to query.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2591,7 +2362,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( dask_cluster_id=dask_cluster_id, @@ -2599,19 +2370,15 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_pod_history_serialize( self, dask_cluster_id, @@ -2624,48 +2391,37 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters if component is not None: - - _query_params.append(('component', component.value)) - + + _query_params.append(("component", component.value)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/history', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/history", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2675,12 +2431,9 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_runtime_summary( self, @@ -2688,10 +2441,7 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2724,30 +2474,26 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterRuntimeSummary", + "200": "DaskClusterRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_runtime_summary_with_http_info( self, @@ -2755,10 +2501,7 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2791,30 +2534,26 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterRuntimeSummary", + "200": "DaskClusterRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_runtime_summary_without_preload_content( self, @@ -2822,10 +2561,7 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2858,26 +2594,22 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterRuntimeSummary", + "200": "DaskClusterRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_runtime_summary_serialize( self, dask_cluster_id, @@ -2889,44 +2621,33 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/runtimesummary', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2936,12 +2657,9 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_scheduler_info( self, @@ -2949,10 +2667,7 @@ async def get_scheduler_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2984,30 +2699,26 @@ async def get_scheduler_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_scheduler_info_with_http_info( self, @@ -3015,10 +2726,7 @@ async def get_scheduler_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3050,30 +2758,26 @@ async def get_scheduler_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_scheduler_info_without_preload_content( self, @@ -3081,10 +2785,7 @@ async def get_scheduler_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3116,26 +2817,22 @@ async def get_scheduler_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_scheduler_info_serialize( self, dask_cluster_id, @@ -3147,44 +2844,33 @@ def _get_scheduler_info_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/scheduler_info', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/scheduler_info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3194,12 +2880,9 @@ def _get_scheduler_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_scheduler_runtimesummary( self, @@ -3207,10 +2890,7 @@ async def get_scheduler_runtimesummary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3243,30 +2923,26 @@ async def get_scheduler_runtimesummary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_runtimesummary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummary", + "200": "PodRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_scheduler_runtimesummary_with_http_info( self, @@ -3274,10 +2950,7 @@ async def get_scheduler_runtimesummary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3310,30 +2983,26 @@ async def get_scheduler_runtimesummary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_runtimesummary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummary", + "200": "PodRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_scheduler_runtimesummary_without_preload_content( self, @@ -3341,10 +3010,7 @@ async def get_scheduler_runtimesummary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3377,26 +3043,22 @@ async def get_scheduler_runtimesummary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_runtimesummary_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PodRuntimeSummary", + "200": "PodRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_scheduler_runtimesummary_serialize( self, dask_cluster_id, @@ -3408,44 +3070,33 @@ def _get_scheduler_runtimesummary_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/scheduler/runtimesummary', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/scheduler/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3455,12 +3106,9 @@ def _get_scheduler_runtimesummary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_scheduler_status( self, @@ -3468,10 +3116,7 @@ async def get_scheduler_status( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3503,30 +3148,26 @@ async def get_scheduler_status( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_status_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_scheduler_status_with_http_info( self, @@ -3534,10 +3175,7 @@ async def get_scheduler_status_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3569,30 +3207,26 @@ async def get_scheduler_status_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_status_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_scheduler_status_without_preload_content( self, @@ -3600,10 +3234,7 @@ async def get_scheduler_status_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3635,26 +3266,22 @@ async def get_scheduler_status_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_scheduler_status_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, object]", + "200": "Dict[str, object]", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_scheduler_status_serialize( self, dask_cluster_id, @@ -3666,44 +3293,33 @@ def _get_scheduler_status_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/status', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/status", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3713,22 +3329,16 @@ def _get_scheduler_status_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3758,39 +3368,32 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterServerOptions", + "200": "DaskClusterServerOptions", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3820,39 +3423,32 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterServerOptions", + "200": "DaskClusterServerOptions", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3882,25 +3478,21 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterServerOptions", + "200": "DaskClusterServerOptions", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_options_serialize( self, _request_auth, @@ -3911,16 +3503,13 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3929,24 +3518,16 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/info', + method="GET", + resource_path="/api/dask_clusters/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3956,12 +3537,9 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_token_info( self, @@ -3969,10 +3547,7 @@ async def get_token_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4004,30 +3579,26 @@ async def get_token_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_token_info_with_http_info( self, @@ -4035,10 +3606,7 @@ async def get_token_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4070,30 +3638,26 @@ async def get_token_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_token_info_without_preload_content( self, @@ -4101,10 +3665,7 @@ async def get_token_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4136,26 +3697,22 @@ async def get_token_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_token_info_serialize( self, dask_cluster_id, @@ -4167,44 +3724,33 @@ def _get_token_info_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/token', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4214,32 +3760,44 @@ def _get_token_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4290,7 +3848,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4306,43 +3864,54 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterList", + "200": "DaskClusterList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4393,7 +3962,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4409,43 +3978,54 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterList", + "200": "DaskClusterList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4496,7 +4076,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -4512,19 +4092,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskClusterList", + "200": "DaskClusterList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -4545,82 +4121,71 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters', + method="GET", + resource_path="/api/dask_clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4630,26 +4195,23 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_worker_runtime_summaries( self, dask_cluster_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4687,7 +4249,7 @@ async def list_worker_runtime_summaries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_worker_runtime_summaries_serialize( dask_cluster_id=dask_cluster_id, @@ -4697,37 +4259,33 @@ async def list_worker_runtime_summaries( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskWorkerRuntimeSummaryList", + "200": "DaskWorkerRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_worker_runtime_summaries_with_http_info( self, dask_cluster_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4765,7 +4323,7 @@ async def list_worker_runtime_summaries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_worker_runtime_summaries_serialize( dask_cluster_id=dask_cluster_id, @@ -4775,37 +4333,33 @@ async def list_worker_runtime_summaries_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskWorkerRuntimeSummaryList", + "200": "DaskWorkerRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_worker_runtime_summaries_without_preload_content( self, dask_cluster_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4843,7 +4397,7 @@ async def list_worker_runtime_summaries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_worker_runtime_summaries_serialize( dask_cluster_id=dask_cluster_id, @@ -4853,19 +4407,15 @@ async def list_worker_runtime_summaries_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskWorkerRuntimeSummaryList", + "200": "DaskWorkerRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_worker_runtime_summaries_serialize( self, dask_cluster_id, @@ -4880,56 +4430,45 @@ def _list_worker_runtime_summaries_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/dask_clusters/{dask_cluster_id}/workers/runtimesummary', + method="GET", + resource_path="/api/dask_clusters/{dask_cluster_id}/workers/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4939,12 +4478,9 @@ def _list_worker_runtime_summaries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def restart( self, @@ -4952,10 +4488,7 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4988,30 +4521,26 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def restart_with_http_info( self, @@ -5019,10 +4548,7 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5055,30 +4581,26 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def restart_without_preload_content( self, @@ -5086,10 +4608,7 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5122,26 +4641,22 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _restart_serialize( self, dask_cluster_id, @@ -5153,44 +4668,33 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters/{dask_cluster_id}/restart', + method="POST", + resource_path="/api/dask_clusters/{dask_cluster_id}/restart", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5200,12 +4704,9 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def rotate_token( self, @@ -5213,10 +4714,7 @@ async def rotate_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5249,30 +4747,26 @@ async def rotate_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def rotate_token_with_http_info( self, @@ -5280,10 +4774,7 @@ async def rotate_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5316,30 +4807,26 @@ async def rotate_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def rotate_token_without_preload_content( self, @@ -5347,10 +4834,7 @@ async def rotate_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5383,26 +4867,22 @@ async def rotate_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _rotate_token_serialize( self, dask_cluster_id, @@ -5414,44 +4894,33 @@ def _rotate_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters/{dask_cluster_id}/token', + method="POST", + resource_path="/api/dask_clusters/{dask_cluster_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5461,12 +4930,9 @@ def _rotate_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def scale( self, @@ -5475,10 +4941,7 @@ async def scale( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5512,7 +4975,7 @@ async def scale( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._scale_serialize( dask_cluster_id=dask_cluster_id, @@ -5520,23 +4983,19 @@ async def scale( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def scale_with_http_info( self, @@ -5545,10 +5004,7 @@ async def scale_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5582,7 +5038,7 @@ async def scale_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._scale_serialize( dask_cluster_id=dask_cluster_id, @@ -5590,23 +5046,19 @@ async def scale_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def scale_without_preload_content( self, @@ -5615,10 +5067,7 @@ async def scale_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5652,7 +5101,7 @@ async def scale_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._scale_serialize( dask_cluster_id=dask_cluster_id, @@ -5660,19 +5109,15 @@ async def scale_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _scale_serialize( self, dask_cluster_id, @@ -5685,21 +5130,18 @@ def _scale_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -5707,30 +5149,20 @@ def _scale_serialize( if dask_cluster_scale is not None: _body_params = dask_cluster_scale - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters/{dask_cluster_id}/scale', + method="POST", + resource_path="/api/dask_clusters/{dask_cluster_id}/scale", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5740,12 +5172,9 @@ def _scale_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def start( self, @@ -5753,10 +5182,7 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5789,30 +5215,26 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def start_with_http_info( self, @@ -5820,10 +5242,7 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5856,30 +5275,26 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def start_without_preload_content( self, @@ -5887,10 +5302,7 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5923,26 +5335,22 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _start_serialize( self, dask_cluster_id, @@ -5954,44 +5362,33 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters/{dask_cluster_id}/start', + method="POST", + resource_path="/api/dask_clusters/{dask_cluster_id}/start", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6001,12 +5398,9 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def stop( self, @@ -6014,10 +5408,7 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6050,30 +5441,26 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def stop_with_http_info( self, @@ -6081,10 +5468,7 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6117,30 +5501,26 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def stop_without_preload_content( self, @@ -6148,10 +5528,7 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6184,26 +5561,22 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( dask_cluster_id=dask_cluster_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_serialize( self, dask_cluster_id, @@ -6215,44 +5588,33 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/dask_clusters/{dask_cluster_id}/stop', + method="POST", + resource_path="/api/dask_clusters/{dask_cluster_id}/stop", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6262,12 +5624,9 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -6276,10 +5635,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6314,7 +5670,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( dask_cluster_id=dask_cluster_id, @@ -6322,23 +5678,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -6347,10 +5699,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6385,7 +5734,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( dask_cluster_id=dask_cluster_id, @@ -6393,23 +5742,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -6418,10 +5763,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6456,7 +5798,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( dask_cluster_id=dask_cluster_id, @@ -6464,19 +5806,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DaskCluster", + "200": "DaskCluster", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, dask_cluster_id, @@ -6489,21 +5827,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -6511,37 +5846,24 @@ def _update_serialize( if dask_cluster_update is not None: _body_params = dask_cluster_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/dask_clusters/{dask_cluster_id}', + method="PATCH", + resource_path="/api/dask_clusters/{dask_cluster_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6551,12 +5873,9 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_token( self, @@ -6565,10 +5884,7 @@ async def update_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6603,7 +5919,7 @@ async def update_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( dask_cluster_id=dask_cluster_id, @@ -6611,23 +5927,19 @@ async def update_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_token_with_http_info( self, @@ -6636,10 +5948,7 @@ async def update_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6674,7 +5983,7 @@ async def update_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( dask_cluster_id=dask_cluster_id, @@ -6682,23 +5991,19 @@ async def update_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_token_without_preload_content( self, @@ -6707,10 +6012,7 @@ async def update_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6745,7 +6047,7 @@ async def update_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( dask_cluster_id=dask_cluster_id, @@ -6753,19 +6055,15 @@ async def update_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_token_serialize( self, dask_cluster_id, @@ -6778,21 +6076,18 @@ def _update_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if dask_cluster_id is not None: - _path_params['dask_cluster_id'] = dask_cluster_id + _path_params["dask_cluster_id"] = dask_cluster_id # process the query parameters # process the header parameters # process the form parameters @@ -6800,37 +6095,24 @@ def _update_token_serialize( if resource_token_update is not None: _body_params = resource_token_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/dask_clusters/{dask_cluster_id}/token', + method="PATCH", + resource_path="/api/dask_clusters/{dask_cluster_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6840,7 +6122,5 @@ def _update_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/datasets_api.py b/saturn_api/api/datasets_api.py new file mode 100644 index 0000000..ef8e890 --- /dev/null +++ b/saturn_api/api/datasets_api.py @@ -0,0 +1,1336 @@ +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Dict, List, Optional, Tuple, Union + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse +from saturn_api.models.artifact_status import ArtifactStatus +from saturn_api.models.dataset import Dataset +from saturn_api.models.dataset_create import DatasetCreate +from saturn_api.models.dataset_list import DatasetList +from saturn_api.rest import RESTResponseType + + +class DatasetsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + async def create( + self, + org_id: StrictStr, + dataset_create: DatasetCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dataset: + """Create dataset + + Create a new dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_create: (required) + :type dataset_create: DatasetCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + dataset_create=dataset_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def create_with_http_info( + self, + org_id: StrictStr, + dataset_create: DatasetCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dataset]: + """Create dataset + + Create a new dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_create: (required) + :type dataset_create: DatasetCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + dataset_create=dataset_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def create_without_preload_content( + self, + org_id: StrictStr, + dataset_create: DatasetCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create dataset + + Create a new dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_create: (required) + :type dataset_create: DatasetCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + dataset_create=dataset_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_serialize( + self, + org_id, + dataset_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if dataset_create is not None: + _body_params = dataset_create + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/datasets", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def delete( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete dataset + + Delete a dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def delete_with_http_info( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete dataset + + Delete a dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def delete_without_preload_content( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete dataset + + Delete a dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_serialize( + self, + org_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if dataset_id is not None: + _path_params["dataset_id"] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/orgs/{org_id}/token-factory/datasets/{dataset_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def get( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dataset: + """Get dataset + + Get a dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def get_with_http_info( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dataset]: + """Get dataset + + Get a dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def get_without_preload_content( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get dataset + + Get a dataset. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_serialize( + self, + org_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if dataset_id is not None: + _path_params["dataset_id"] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/datasets/{dataset_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def list( + self, + org_id: StrictStr, + status: Annotated[ + Optional[ArtifactStatus], Field(description="Filter datasets by status.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetList: + """List datasets + + Paginated list of datasets. + + :param org_id: (required) + :type org_id: str + :param status: Filter datasets by status. + :type status: ArtifactStatus + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + status=status, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "DatasetList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def list_with_http_info( + self, + org_id: StrictStr, + status: Annotated[ + Optional[ArtifactStatus], Field(description="Filter datasets by status.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetList]: + """List datasets + + Paginated list of datasets. + + :param org_id: (required) + :type org_id: str + :param status: Filter datasets by status. + :type status: ArtifactStatus + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + status=status, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "DatasetList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def list_without_preload_content( + self, + org_id: StrictStr, + status: Annotated[ + Optional[ArtifactStatus], Field(description="Filter datasets by status.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List datasets + + Paginated list of datasets. + + :param org_id: (required) + :type org_id: str + :param status: Filter datasets by status. + :type status: ArtifactStatus + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + status=status, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "DatasetList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_serialize( + self, + org_id, + status, + prev_key, + next_key, + page_size, + descending, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + if status is not None: + + _query_params.append(("status", status.value)) + + if prev_key is not None: + + _query_params.append(("prev_key", prev_key)) + + if next_key is not None: + + _query_params.append(("next_key", next_key)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + if descending is not None: + + _query_params.append(("descending", descending)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/datasets", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def seal( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dataset: + """Seal dataset + + Transition a dataset from `assembling` to `ready`, making it immutable. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._seal_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def seal_with_http_info( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dataset]: + """Seal dataset + + Transition a dataset from `assembling` to `ready`, making it immutable. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._seal_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def seal_without_preload_content( + self, + org_id: StrictStr, + dataset_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Seal dataset + + Transition a dataset from `assembling` to `ready`, making it immutable. + + :param org_id: (required) + :type org_id: str + :param dataset_id: (required) + :type dataset_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._seal_serialize( + org_id=org_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _seal_serialize( + self, + org_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if dataset_id is not None: + _path_params["dataset_id"] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/datasets/{dataset_id}/seal", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/saturn_api/api/deployments_api.py b/saturn_api/api/deployments_api.py index a435160..6f2d1e9 100644 --- a/saturn_api/api/deployments_api.py +++ b/saturn_api/api/deployments_api.py @@ -1,24 +1,30 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.deployment import Deployment from saturn_api.models.deployment_create import DeploymentCreate from saturn_api.models.deployment_list import DeploymentList @@ -42,13 +48,12 @@ from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate from saturn_api.models.service_account_attachment import ServiceAccountAttachment -from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment +from saturn_api.models.service_account_create_attachment import ( + ServiceAccountCreateAttachment, +) from saturn_api.models.viewer import Viewer from saturn_api.models.viewer_create import ViewerCreate from saturn_api.models.viewer_list import ViewerList - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -64,7 +69,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -72,10 +76,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -108,30 +109,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( deployment_create=deployment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Deployment", + "201": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -139,10 +136,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -175,30 +169,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( deployment_create=deployment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Deployment", + "201": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -206,10 +196,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -242,26 +229,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( deployment_create=deployment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Deployment", + "201": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, deployment_create, @@ -273,16 +256,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -293,37 +273,24 @@ def _create_serialize( if deployment_create is not None: _body_params = deployment_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments', + method="POST", + resource_path="/api/deployments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -333,12 +300,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_resource_template( self, @@ -346,10 +310,7 @@ async def create_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -381,30 +342,26 @@ async def create_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_resource_template_with_http_info( self, @@ -412,10 +369,7 @@ async def create_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -447,30 +401,26 @@ async def create_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_resource_template_without_preload_content( self, @@ -478,10 +428,7 @@ async def create_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -513,26 +460,22 @@ async def create_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_resource_template_serialize( self, deployment_id, @@ -544,44 +487,33 @@ def _create_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/template', + method="POST", + resource_path="/api/deployments/{deployment_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -591,12 +523,9 @@ def _create_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_route( self, @@ -605,10 +534,7 @@ async def create_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -643,7 +569,7 @@ async def create_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( deployment_id=deployment_id, @@ -651,23 +577,19 @@ async def create_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Route", + "201": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_route_with_http_info( self, @@ -676,10 +598,7 @@ async def create_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -714,7 +633,7 @@ async def create_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( deployment_id=deployment_id, @@ -722,23 +641,19 @@ async def create_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Route", + "201": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_route_without_preload_content( self, @@ -747,10 +662,7 @@ async def create_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -785,7 +697,7 @@ async def create_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( deployment_id=deployment_id, @@ -793,19 +705,15 @@ async def create_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Route", + "201": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_route_serialize( self, deployment_id, @@ -818,21 +726,18 @@ def _create_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -840,37 +745,24 @@ def _create_route_serialize( if route_create is not None: _body_params = route_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/routes', + method="POST", + resource_path="/api/deployments/{deployment_id}/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -880,12 +772,9 @@ def _create_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_secret_attachment( self, @@ -894,10 +783,7 @@ async def create_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -931,7 +817,7 @@ async def create_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( deployment_id=deployment_id, @@ -939,23 +825,19 @@ async def create_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_secret_attachment_with_http_info( self, @@ -964,10 +846,7 @@ async def create_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1001,7 +880,7 @@ async def create_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( deployment_id=deployment_id, @@ -1009,23 +888,19 @@ async def create_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_secret_attachment_without_preload_content( self, @@ -1034,10 +909,7 @@ async def create_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1071,7 +943,7 @@ async def create_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( deployment_id=deployment_id, @@ -1079,19 +951,15 @@ async def create_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_secret_attachment_serialize( self, deployment_id, @@ -1104,21 +972,18 @@ def _create_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -1126,37 +991,24 @@ def _create_secret_attachment_serialize( if secret_attachment_create is not None: _body_params = secret_attachment_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/secrets', + method="POST", + resource_path="/api/deployments/{deployment_id}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1166,12 +1018,9 @@ def _create_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_service_account_attachment( self, @@ -1180,10 +1029,7 @@ async def create_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1217,7 +1063,7 @@ async def create_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( deployment_id=deployment_id, @@ -1225,23 +1071,19 @@ async def create_service_account_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_service_account_attachment_with_http_info( self, @@ -1250,10 +1092,7 @@ async def create_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1287,7 +1126,7 @@ async def create_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( deployment_id=deployment_id, @@ -1295,23 +1134,19 @@ async def create_service_account_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_service_account_attachment_without_preload_content( self, @@ -1320,10 +1155,7 @@ async def create_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1357,7 +1189,7 @@ async def create_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( deployment_id=deployment_id, @@ -1365,19 +1197,15 @@ async def create_service_account_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_service_account_attachment_serialize( self, deployment_id, @@ -1390,21 +1218,18 @@ def _create_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -1412,37 +1237,24 @@ def _create_service_account_attachment_serialize( if service_account_create_attachment is not None: _body_params = service_account_create_attachment - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/deployments/{deployment_id}/service_account', + method="PUT", + resource_path="/api/deployments/{deployment_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1452,12 +1264,9 @@ def _create_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_viewer( self, @@ -1466,10 +1275,7 @@ async def create_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1504,7 +1310,7 @@ async def create_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( deployment_id=deployment_id, @@ -1512,23 +1318,19 @@ async def create_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Viewer", + "201": "Viewer", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_viewer_with_http_info( self, @@ -1537,10 +1339,7 @@ async def create_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1575,7 +1374,7 @@ async def create_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( deployment_id=deployment_id, @@ -1583,23 +1382,19 @@ async def create_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Viewer", + "201": "Viewer", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_viewer_without_preload_content( self, @@ -1608,10 +1403,7 @@ async def create_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1646,7 +1438,7 @@ async def create_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( deployment_id=deployment_id, @@ -1654,19 +1446,15 @@ async def create_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Viewer", + "201": "Viewer", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_viewer_serialize( self, deployment_id, @@ -1679,21 +1467,18 @@ def _create_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -1701,37 +1486,24 @@ def _create_viewer_serialize( if viewer_create is not None: _body_params = viewer_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/viewers', + method="POST", + resource_path="/api/deployments/{deployment_id}/viewers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1741,24 +1513,21 @@ def _create_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, deployment_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete deployment that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete deployment that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1793,7 +1562,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( deployment_id=deployment_id, @@ -1801,35 +1570,31 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, deployment_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete deployment that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete deployment that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1864,7 +1629,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( deployment_id=deployment_id, @@ -1872,35 +1637,31 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, deployment_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete deployment that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete deployment that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1935,7 +1696,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( deployment_id=deployment_id, @@ -1943,19 +1704,15 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, deployment_id, @@ -1968,41 +1725,33 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if allow_active is not None: - - _query_params.append(('allow_active', allow_active)) - + + _query_params.append(("allow_active", allow_active)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/deployments/{deployment_id}', + method="DELETE", + resource_path="/api/deployments/{deployment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2012,12 +1761,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_route( self, @@ -2026,10 +1772,7 @@ async def delete_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2064,7 +1807,7 @@ async def delete_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( deployment_id=deployment_id, @@ -2072,23 +1815,19 @@ async def delete_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_route_with_http_info( self, @@ -2097,10 +1836,7 @@ async def delete_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2135,7 +1871,7 @@ async def delete_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( deployment_id=deployment_id, @@ -2143,23 +1879,19 @@ async def delete_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_route_without_preload_content( self, @@ -2168,10 +1900,7 @@ async def delete_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2206,7 +1935,7 @@ async def delete_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( deployment_id=deployment_id, @@ -2214,19 +1943,15 @@ async def delete_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_route_serialize( self, deployment_id, @@ -2239,39 +1964,31 @@ def _delete_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if route_id is not None: - _path_params['route_id'] = route_id + _path_params["route_id"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/deployments/{deployment_id}/routes/{route_id}', + method="DELETE", + resource_path="/api/deployments/{deployment_id}/routes/{route_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2281,12 +1998,9 @@ def _delete_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_secret_attachment( self, @@ -2295,10 +2009,7 @@ async def delete_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2332,7 +2043,7 @@ async def delete_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( deployment_id=deployment_id, @@ -2340,23 +2051,19 @@ async def delete_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_secret_attachment_with_http_info( self, @@ -2365,10 +2072,7 @@ async def delete_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2402,7 +2106,7 @@ async def delete_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( deployment_id=deployment_id, @@ -2410,23 +2114,19 @@ async def delete_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_secret_attachment_without_preload_content( self, @@ -2435,10 +2135,7 @@ async def delete_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2472,7 +2169,7 @@ async def delete_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( deployment_id=deployment_id, @@ -2480,19 +2177,15 @@ async def delete_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_secret_attachment_serialize( self, deployment_id, @@ -2505,39 +2198,31 @@ def _delete_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/deployments/{deployment_id}/secrets/{secret_attachment_id}', + method="DELETE", + resource_path="/api/deployments/{deployment_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2547,12 +2232,9 @@ def _delete_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_service_account_attachment( self, @@ -2560,10 +2242,7 @@ async def delete_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2595,30 +2274,26 @@ async def delete_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_service_account_attachment_with_http_info( self, @@ -2626,10 +2301,7 @@ async def delete_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2661,30 +2333,26 @@ async def delete_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_service_account_attachment_without_preload_content( self, @@ -2692,10 +2360,7 @@ async def delete_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2727,26 +2392,22 @@ async def delete_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_service_account_attachment_serialize( self, deployment_id, @@ -2758,37 +2419,29 @@ def _delete_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/deployments/{deployment_id}/service_account', + method="DELETE", + resource_path="/api/deployments/{deployment_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2798,12 +2451,9 @@ def _delete_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_viewer( self, @@ -2812,10 +2462,7 @@ async def delete_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2850,7 +2497,7 @@ async def delete_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( deployment_id=deployment_id, @@ -2858,23 +2505,19 @@ async def delete_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_viewer_with_http_info( self, @@ -2883,10 +2526,7 @@ async def delete_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2921,7 +2561,7 @@ async def delete_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( deployment_id=deployment_id, @@ -2929,23 +2569,19 @@ async def delete_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_viewer_without_preload_content( self, @@ -2954,10 +2590,7 @@ async def delete_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2992,7 +2625,7 @@ async def delete_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( deployment_id=deployment_id, @@ -3000,19 +2633,15 @@ async def delete_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_viewer_serialize( self, deployment_id, @@ -3025,39 +2654,31 @@ def _delete_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if viewer_id is not None: - _path_params['viewer_id'] = viewer_id + _path_params["viewer_id"] = viewer_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/deployments/{deployment_id}/viewers/{viewer_id}', + method="DELETE", + resource_path="/api/deployments/{deployment_id}/viewers/{viewer_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3067,12 +2688,9 @@ def _delete_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -3080,10 +2698,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3116,30 +2731,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -3147,10 +2758,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3183,30 +2791,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -3214,10 +2818,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3250,26 +2851,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, deployment_id, @@ -3281,44 +2878,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}', + method="GET", + resource_path="/api/deployments/{deployment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3328,12 +2914,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_cluster_history( self, @@ -3341,10 +2924,7 @@ async def get_cluster_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3377,30 +2957,26 @@ async def get_cluster_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_cluster_history_with_http_info( self, @@ -3408,10 +2984,7 @@ async def get_cluster_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3444,30 +3017,26 @@ async def get_cluster_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_cluster_history_without_preload_content( self, @@ -3475,10 +3044,7 @@ async def get_cluster_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3511,26 +3077,22 @@ async def get_cluster_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_cluster_history_serialize( self, deployment_id, @@ -3542,44 +3104,33 @@ def _get_cluster_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/clusters', + method="GET", + resource_path="/api/deployments/{deployment_id}/clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3589,28 +3140,29 @@ def _get_cluster_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_logs( self, deployment_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3653,7 +3205,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( deployment_id=deployment_id, @@ -3665,39 +3217,39 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_logs_with_http_info( self, deployment_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3740,7 +3292,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( deployment_id=deployment_id, @@ -3752,39 +3304,39 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_logs_without_preload_content( self, deployment_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3827,7 +3379,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( deployment_id=deployment_id, @@ -3839,19 +3391,15 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_serialize( self, deployment_id, @@ -3868,64 +3416,53 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if pod_name is not None: - - _query_params.append(('pod_name', pod_name)) - + + _query_params.append(("pod_name", pod_name)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/logs', + method="GET", + resource_path="/api/deployments/{deployment_id}/logs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3935,28 +3472,32 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_metrics( self, deployment_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3999,7 +3540,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( deployment_id=deployment_id, @@ -4011,39 +3552,42 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_metrics_with_http_info( self, deployment_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4086,7 +3630,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( deployment_id=deployment_id, @@ -4098,39 +3642,42 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_metrics_without_preload_content( self, deployment_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4173,7 +3720,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( deployment_id=deployment_id, @@ -4185,19 +3732,15 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_metrics_serialize( self, deployment_id, @@ -4214,82 +3757,61 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if type is not None: - - _query_params.append(('type', type)) - + + _query_params.append(("type", type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if resolution is not None: - - _query_params.append(('resolution', resolution)) - + + _query_params.append(("resolution", resolution)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/metrics', + method="GET", + resource_path="/api/deployments/{deployment_id}/metrics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4299,24 +3821,20 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_pod_history( self, deployment_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4351,7 +3869,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( deployment_id=deployment_id, @@ -4359,35 +3877,30 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_pod_history_with_http_info( self, deployment_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4422,7 +3935,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( deployment_id=deployment_id, @@ -4430,35 +3943,30 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_pod_history_without_preload_content( self, deployment_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4493,7 +4001,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( deployment_id=deployment_id, @@ -4501,19 +4009,15 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_pod_history_serialize( self, deployment_id, @@ -4526,48 +4030,37 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/history', + method="GET", + resource_path="/api/deployments/{deployment_id}/history", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4577,12 +4070,9 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_recipe( self, @@ -4591,10 +4081,7 @@ async def get_recipe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4628,7 +4115,7 @@ async def get_recipe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( deployment_id=deployment_id, @@ -4636,23 +4123,19 @@ async def get_recipe( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRecipe", + "200": "DeploymentRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_recipe_with_http_info( self, @@ -4661,10 +4144,7 @@ async def get_recipe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4698,7 +4178,7 @@ async def get_recipe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( deployment_id=deployment_id, @@ -4706,23 +4186,19 @@ async def get_recipe_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRecipe", + "200": "DeploymentRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_recipe_without_preload_content( self, @@ -4731,10 +4207,7 @@ async def get_recipe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4768,7 +4241,7 @@ async def get_recipe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( deployment_id=deployment_id, @@ -4776,19 +4249,15 @@ async def get_recipe_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRecipe", + "200": "DeploymentRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_recipe_serialize( self, deployment_id, @@ -4801,48 +4270,37 @@ def _get_recipe_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if as_template is not None: - - _query_params.append(('as_template', as_template)) - + + _query_params.append(("as_template", as_template)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/recipe', + method="GET", + resource_path="/api/deployments/{deployment_id}/recipe", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4852,12 +4310,9 @@ def _get_recipe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_resource_template( self, @@ -4865,10 +4320,7 @@ async def get_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4900,30 +4352,26 @@ async def get_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_resource_template_with_http_info( self, @@ -4931,10 +4379,7 @@ async def get_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4966,30 +4411,26 @@ async def get_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_resource_template_without_preload_content( self, @@ -4997,10 +4438,7 @@ async def get_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5032,26 +4470,22 @@ async def get_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_resource_template_serialize( self, deployment_id, @@ -5063,44 +4497,33 @@ def _get_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/template', + method="GET", + resource_path="/api/deployments/{deployment_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5110,12 +4533,9 @@ def _get_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_route( self, @@ -5124,10 +4544,7 @@ async def get_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5162,7 +4579,7 @@ async def get_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( deployment_id=deployment_id, @@ -5170,23 +4587,19 @@ async def get_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_route_with_http_info( self, @@ -5195,10 +4608,7 @@ async def get_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5233,7 +4643,7 @@ async def get_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( deployment_id=deployment_id, @@ -5241,23 +4651,19 @@ async def get_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_route_without_preload_content( self, @@ -5266,10 +4672,7 @@ async def get_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5304,7 +4707,7 @@ async def get_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( deployment_id=deployment_id, @@ -5312,19 +4715,15 @@ async def get_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_route_serialize( self, deployment_id, @@ -5337,46 +4736,35 @@ def _get_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if route_id is not None: - _path_params['route_id'] = route_id + _path_params["route_id"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/routes/{route_id}', + method="GET", + resource_path="/api/deployments/{deployment_id}/routes/{route_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5386,12 +4774,9 @@ def _get_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_runtime_summary( self, @@ -5399,10 +4784,7 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5435,30 +4817,26 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRuntimeSummary", + "200": "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_runtime_summary_with_http_info( self, @@ -5466,10 +4844,7 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5502,30 +4877,26 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRuntimeSummary", + "200": "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_runtime_summary_without_preload_content( self, @@ -5533,10 +4904,7 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5569,26 +4937,22 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentRuntimeSummary", + "200": "DeploymentRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_runtime_summary_serialize( self, deployment_id, @@ -5600,44 +4964,33 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/runtimesummary', + method="GET", + resource_path="/api/deployments/{deployment_id}/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5647,12 +5000,9 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_secret_attachment( self, @@ -5661,10 +5011,7 @@ async def get_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5698,7 +5045,7 @@ async def get_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( deployment_id=deployment_id, @@ -5706,23 +5053,19 @@ async def get_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_secret_attachment_with_http_info( self, @@ -5731,10 +5074,7 @@ async def get_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5768,7 +5108,7 @@ async def get_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( deployment_id=deployment_id, @@ -5776,23 +5116,19 @@ async def get_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_secret_attachment_without_preload_content( self, @@ -5801,10 +5137,7 @@ async def get_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5838,7 +5171,7 @@ async def get_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( deployment_id=deployment_id, @@ -5846,19 +5179,15 @@ async def get_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_secret_attachment_serialize( self, deployment_id, @@ -5871,46 +5200,35 @@ def _get_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/secrets/{secret_attachment_id}', + method="GET", + resource_path="/api/deployments/{deployment_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5920,22 +5238,16 @@ def _get_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5965,39 +5277,32 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentServerInfo", + "200": "DeploymentServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6027,39 +5332,32 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentServerInfo", + "200": "DeploymentServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6089,25 +5387,21 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentServerInfo", + "200": "DeploymentServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_options_serialize( self, _request_auth, @@ -6118,16 +5412,13 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6136,24 +5427,16 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/info', + method="GET", + resource_path="/api/deployments/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6163,12 +5446,9 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_service_account_attachment( self, @@ -6176,10 +5456,7 @@ async def get_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6211,30 +5488,26 @@ async def get_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_service_account_attachment_with_http_info( self, @@ -6242,10 +5515,7 @@ async def get_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6277,30 +5547,26 @@ async def get_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_service_account_attachment_without_preload_content( self, @@ -6308,10 +5574,7 @@ async def get_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6343,26 +5606,22 @@ async def get_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_service_account_attachment_serialize( self, deployment_id, @@ -6374,44 +5633,33 @@ def _get_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/service_account', + method="GET", + resource_path="/api/deployments/{deployment_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6421,34 +5669,54 @@ def _get_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on deployment name.")] = None, - tags: Annotated[Optional[StrictStr], Field(description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on deployment name."), + ] = None, + tags: Annotated[ + Optional[StrictStr], + Field( + description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6503,7 +5771,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6521,45 +5789,64 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentList", + "200": "DeploymentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on deployment name.")] = None, - tags: Annotated[Optional[StrictStr], Field(description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on deployment name."), + ] = None, + tags: Annotated[ + Optional[StrictStr], + Field( + description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6614,7 +5901,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6632,45 +5919,64 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentList", + "200": "DeploymentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on deployment name.")] = None, - tags: Annotated[Optional[StrictStr], Field(description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on deployment name."), + ] = None, + tags: Annotated[ + Optional[StrictStr], + Field( + description="Filter to deployments whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6725,7 +6031,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6743,19 +6049,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentList", + "200": "DeploymentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -6778,90 +6080,79 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if tags is not None: - - _query_params.append(('tags', tags)) - + + _query_params.append(("tags", tags)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments', + method="GET", + resource_path="/api/deployments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6871,28 +6162,30 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_routes( self, deployment_id: StrictStr, - subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, + subdomain: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on route subdomain."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6935,7 +6228,7 @@ async def list_routes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( deployment_id=deployment_id, @@ -6947,39 +6240,40 @@ async def list_routes( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RouteList", + "200": "RouteList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_routes_with_http_info( self, deployment_id: StrictStr, - subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, + subdomain: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on route subdomain."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7022,7 +6316,7 @@ async def list_routes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( deployment_id=deployment_id, @@ -7034,39 +6328,40 @@ async def list_routes_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RouteList", + "200": "RouteList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_routes_without_preload_content( self, deployment_id: StrictStr, - subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, + subdomain: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on route subdomain."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7109,7 +6404,7 @@ async def list_routes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( deployment_id=deployment_id, @@ -7121,19 +6416,15 @@ async def list_routes_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RouteList", + "200": "RouteList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_routes_serialize( self, deployment_id, @@ -7150,64 +6441,53 @@ def _list_routes_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if subdomain is not None: - - _query_params.append(('subdomain', subdomain)) - + + _query_params.append(("subdomain", subdomain)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/routes', + method="GET", + resource_path="/api/deployments/{deployment_id}/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7217,29 +6497,33 @@ def _list_routes_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_secret_attachments( self, deployment_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7283,7 +6567,7 @@ async def list_secret_attachments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( deployment_id=deployment_id, @@ -7296,40 +6580,43 @@ async def list_secret_attachments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_secret_attachments_with_http_info( self, deployment_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7373,7 +6660,7 @@ async def list_secret_attachments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( deployment_id=deployment_id, @@ -7386,40 +6673,43 @@ async def list_secret_attachments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_secret_attachments_without_preload_content( self, deployment_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7463,7 +6753,7 @@ async def list_secret_attachments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( deployment_id=deployment_id, @@ -7476,19 +6766,15 @@ async def list_secret_attachments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_secret_attachments_serialize( self, deployment_id, @@ -7506,68 +6792,57 @@ def _list_secret_attachments_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if location is not None: - - _query_params.append(('location', location)) - + + _query_params.append(("location", location)) + if attachment_type is not None: - - _query_params.append(('attachment_type', attachment_type.value)) - + + _query_params.append(("attachment_type", attachment_type.value)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/secrets', + method="GET", + resource_path="/api/deployments/{deployment_id}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7577,28 +6852,29 @@ def _list_secret_attachments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_viewers( self, deployment_id: StrictStr, - route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, + route_id: Annotated[ + Optional[StrictStr], Field(description="Filter viewers by route ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7641,7 +6917,7 @@ async def list_viewers( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( deployment_id=deployment_id, @@ -7653,39 +6929,39 @@ async def list_viewers( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewerList", + "200": "ViewerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_viewers_with_http_info( self, deployment_id: StrictStr, - route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, + route_id: Annotated[ + Optional[StrictStr], Field(description="Filter viewers by route ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7728,7 +7004,7 @@ async def list_viewers_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( deployment_id=deployment_id, @@ -7740,39 +7016,39 @@ async def list_viewers_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewerList", + "200": "ViewerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_viewers_without_preload_content( self, deployment_id: StrictStr, - route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, + route_id: Annotated[ + Optional[StrictStr], Field(description="Filter viewers by route ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7815,7 +7091,7 @@ async def list_viewers_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( deployment_id=deployment_id, @@ -7827,19 +7103,15 @@ async def list_viewers_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewerList", + "200": "ViewerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_viewers_serialize( self, deployment_id, @@ -7856,64 +7128,53 @@ def _list_viewers_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters if route_id is not None: - - _query_params.append(('route_id', route_id)) - + + _query_params.append(("route_id", route_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/deployments/{deployment_id}/viewers', + method="GET", + resource_path="/api/deployments/{deployment_id}/viewers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7923,12 +7184,9 @@ def _list_viewers_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def restart( self, @@ -7937,10 +7195,7 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7975,7 +7230,7 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( deployment_id=deployment_id, @@ -7983,23 +7238,19 @@ async def restart( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def restart_with_http_info( self, @@ -8008,10 +7259,7 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8046,7 +7294,7 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( deployment_id=deployment_id, @@ -8054,23 +7302,19 @@ async def restart_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def restart_without_preload_content( self, @@ -8079,10 +7323,7 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8117,7 +7358,7 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( deployment_id=deployment_id, @@ -8125,19 +7366,15 @@ async def restart_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _restart_serialize( self, deployment_id, @@ -8150,21 +7387,18 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -8172,37 +7406,24 @@ def _restart_serialize( if deployment_start is not None: _body_params = deployment_start - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/restart', + method="POST", + resource_path="/api/deployments/{deployment_id}/restart", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8212,12 +7433,9 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def start( self, @@ -8226,10 +7444,7 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8264,7 +7479,7 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( deployment_id=deployment_id, @@ -8272,23 +7487,19 @@ async def start( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def start_with_http_info( self, @@ -8297,10 +7508,7 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8335,7 +7543,7 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( deployment_id=deployment_id, @@ -8343,23 +7551,19 @@ async def start_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def start_without_preload_content( self, @@ -8368,10 +7572,7 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8406,7 +7607,7 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( deployment_id=deployment_id, @@ -8414,19 +7615,15 @@ async def start_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _start_serialize( self, deployment_id, @@ -8439,21 +7636,18 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -8461,37 +7655,24 @@ def _start_serialize( if deployment_start is not None: _body_params = deployment_start - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/start', + method="POST", + resource_path="/api/deployments/{deployment_id}/start", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8501,12 +7682,9 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def stop( self, @@ -8514,10 +7692,7 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8550,30 +7725,26 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def stop_with_http_info( self, @@ -8581,10 +7752,7 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8617,30 +7785,26 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def stop_without_preload_content( self, @@ -8648,10 +7812,7 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8684,26 +7845,22 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_serialize( self, deployment_id, @@ -8715,44 +7872,33 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/deployments/{deployment_id}/stop', + method="POST", + resource_path="/api/deployments/{deployment_id}/stop", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8762,12 +7908,9 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -8776,10 +7919,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8814,7 +7954,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( deployment_id=deployment_id, @@ -8822,23 +7962,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -8847,10 +7983,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8885,7 +8018,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( deployment_id=deployment_id, @@ -8893,23 +8026,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -8918,10 +8047,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8956,7 +8082,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( deployment_id=deployment_id, @@ -8964,19 +8090,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Deployment", + "200": "Deployment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, deployment_id, @@ -8989,21 +8111,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters @@ -9011,37 +8130,24 @@ def _update_serialize( if deployment_update is not None: _body_params = deployment_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/deployments/{deployment_id}', + method="PATCH", + resource_path="/api/deployments/{deployment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9051,12 +8157,9 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_resource_template( self, @@ -9064,10 +8167,7 @@ async def update_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9099,30 +8199,26 @@ async def update_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_resource_template_with_http_info( self, @@ -9130,10 +8226,7 @@ async def update_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9165,30 +8258,26 @@ async def update_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_resource_template_without_preload_content( self, @@ -9196,10 +8285,7 @@ async def update_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9231,26 +8317,22 @@ async def update_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( deployment_id=deployment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_resource_template_serialize( self, deployment_id, @@ -9262,44 +8344,33 @@ def _update_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/deployments/{deployment_id}/template', + method="PATCH", + resource_path="/api/deployments/{deployment_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9309,12 +8380,9 @@ def _update_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_route( self, @@ -9324,10 +8392,7 @@ async def update_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9364,7 +8429,7 @@ async def update_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( deployment_id=deployment_id, @@ -9373,23 +8438,19 @@ async def update_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_route_with_http_info( self, @@ -9399,10 +8460,7 @@ async def update_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9439,7 +8497,7 @@ async def update_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( deployment_id=deployment_id, @@ -9448,23 +8506,19 @@ async def update_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_route_without_preload_content( self, @@ -9474,10 +8528,7 @@ async def update_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9514,7 +8565,7 @@ async def update_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( deployment_id=deployment_id, @@ -9523,19 +8574,15 @@ async def update_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_route_serialize( self, deployment_id, @@ -9549,23 +8596,20 @@ def _update_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if route_id is not None: - _path_params['route_id'] = route_id + _path_params["route_id"] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -9573,37 +8617,24 @@ def _update_route_serialize( if route_update is not None: _body_params = route_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/deployments/{deployment_id}/routes/{route_id}', + method="PATCH", + resource_path="/api/deployments/{deployment_id}/routes/{route_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9613,12 +8644,9 @@ def _update_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_secret_attachment( self, @@ -9628,10 +8656,7 @@ async def update_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9667,7 +8692,7 @@ async def update_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( deployment_id=deployment_id, @@ -9676,23 +8701,19 @@ async def update_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_secret_attachment_with_http_info( self, @@ -9702,10 +8723,7 @@ async def update_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9741,7 +8759,7 @@ async def update_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( deployment_id=deployment_id, @@ -9750,23 +8768,19 @@ async def update_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_secret_attachment_without_preload_content( self, @@ -9776,10 +8790,7 @@ async def update_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9815,7 +8826,7 @@ async def update_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( deployment_id=deployment_id, @@ -9824,19 +8835,15 @@ async def update_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_secret_attachment_serialize( self, deployment_id, @@ -9850,23 +8857,20 @@ def _update_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if deployment_id is not None: - _path_params['deployment_id'] = deployment_id + _path_params["deployment_id"] = deployment_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -9874,37 +8878,24 @@ def _update_secret_attachment_serialize( if secret_attachment_update is not None: _body_params = secret_attachment_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/deployments/{deployment_id}/secrets/{secret_attachment_id}', + method="PATCH", + resource_path="/api/deployments/{deployment_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9914,7 +8905,5 @@ def _update_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/external_repo_attachments_api.py b/saturn_api/api/external_repo_attachments_api.py index 0770e6b..dae0975 100644 --- a/saturn_api/api/external_repo_attachments_api.py +++ b/saturn_api/api/external_repo_attachments_api.py @@ -1,30 +1,29 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from saturn_api.models.external_repo_attachment import ExternalRepoAttachment -from saturn_api.models.external_repo_attachment_create import ExternalRepoAttachmentCreate -from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList -from saturn_api.models.external_repo_attachment_update import ExternalRepoAttachmentUpdate from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.external_repo_attachment import ExternalRepoAttachment +from saturn_api.models.external_repo_attachment_create import ( + ExternalRepoAttachmentCreate, +) +from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList +from saturn_api.models.external_repo_attachment_update import ( + ExternalRepoAttachmentUpdate, +) from saturn_api.rest import RESTResponseType @@ -40,7 +39,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +46,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +79,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_attachment_create=external_repo_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ExternalRepoAttachment", + "201": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +106,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +139,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_attachment_create=external_repo_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ExternalRepoAttachment", + "201": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +166,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +199,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_attachment_create=external_repo_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ExternalRepoAttachment", + "201": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, external_repo_attachment_create, @@ -249,16 +226,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +243,24 @@ def _create_serialize( if external_repo_attachment_create is not None: _body_params = external_repo_attachment_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/external_repo_attachments', + method="POST", + resource_path="/api/external_repo_attachments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +270,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +280,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +313,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +340,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +373,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +400,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +433,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, external_repo_attachment_id, @@ -523,37 +460,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_attachment_id is not None: - _path_params['external_repo_attachment_id'] = external_repo_attachment_id + _path_params["external_repo_attachment_id"] = external_repo_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/external_repo_attachments/{external_repo_attachment_id}', + method="DELETE", + resource_path="/api/external_repo_attachments/{external_repo_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +492,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +502,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +535,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachment", + "200": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +562,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +595,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachment", + "200": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +622,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +655,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_attachment_id=external_repo_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachment", + "200": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, external_repo_attachment_id, @@ -777,44 +682,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_attachment_id is not None: - _path_params['external_repo_attachment_id'] = external_repo_attachment_id + _path_params["external_repo_attachment_id"] = external_repo_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/external_repo_attachments/{external_repo_attachment_id}', + method="GET", + resource_path="/api/external_repo_attachments/{external_repo_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,29 +718,32 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, - workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, + deployment_id: Annotated[ + Optional[StrictStr], Field(description="Reference by deployment ID.") + ] = None, + workspace_id: Annotated[ + Optional[StrictStr], Field(description="Reference by workspace ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -891,7 +788,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -904,40 +801,42 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachmentList", + "200": "ExternalRepoAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, - workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, + deployment_id: Annotated[ + Optional[StrictStr], Field(description="Reference by deployment ID.") + ] = None, + workspace_id: Annotated[ + Optional[StrictStr], Field(description="Reference by workspace ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -982,7 +881,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -995,40 +894,42 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachmentList", + "200": "ExternalRepoAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, - workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, + deployment_id: Annotated[ + Optional[StrictStr], Field(description="Reference by deployment ID.") + ] = None, + workspace_id: Annotated[ + Optional[StrictStr], Field(description="Reference by workspace ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1073,7 +974,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -1086,19 +987,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachmentList", + "200": "ExternalRepoAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, job_id, @@ -1116,70 +1013,59 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if job_id is not None: - - _query_params.append(('job_id', job_id)) - + + _query_params.append(("job_id", job_id)) + if deployment_id is not None: - - _query_params.append(('deployment_id', deployment_id)) - + + _query_params.append(("deployment_id", deployment_id)) + if workspace_id is not None: - - _query_params.append(('workspace_id', workspace_id)) - + + _query_params.append(("workspace_id", workspace_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/external_repo_attachments', + method="GET", + resource_path="/api/external_repo_attachments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1189,12 +1075,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1203,10 +1086,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1241,7 +1121,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_attachment_id=external_repo_attachment_id, @@ -1249,23 +1129,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachment", + "200": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1274,10 +1150,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1312,7 +1185,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_attachment_id=external_repo_attachment_id, @@ -1320,23 +1193,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachment", + "200": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1345,10 +1214,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1383,7 +1249,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_attachment_id=external_repo_attachment_id, @@ -1391,19 +1257,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoAttachment", + "200": "ExternalRepoAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, external_repo_attachment_id, @@ -1416,21 +1278,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_attachment_id is not None: - _path_params['external_repo_attachment_id'] = external_repo_attachment_id + _path_params["external_repo_attachment_id"] = external_repo_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -1438,37 +1297,24 @@ def _update_serialize( if external_repo_attachment_update is not None: _body_params = external_repo_attachment_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/external_repo_attachments/{external_repo_attachment_id}', + method="PATCH", + resource_path="/api/external_repo_attachments/{external_repo_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1478,7 +1324,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/external_repos_api.py b/saturn_api/api/external_repos_api.py index 46f782d..2e16d52 100644 --- a/saturn_api/api/external_repos_api.py +++ b/saturn_api/api/external_repos_api.py @@ -1,30 +1,33 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.external_repo import ExternalRepo from saturn_api.models.external_repo_create import ExternalRepoCreate from saturn_api.models.external_repo_list import ExternalRepoList from saturn_api.models.external_repo_update import ExternalRepoUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,7 +43,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +50,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +83,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_create=external_repo_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ExternalRepo", + "201": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +110,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +143,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_create=external_repo_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ExternalRepo", + "201": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +170,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +203,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( external_repo_create=external_repo_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ExternalRepo", + "201": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, external_repo_create, @@ -249,16 +230,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +247,24 @@ def _create_serialize( if external_repo_create is not None: _body_params = external_repo_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/external_repos', + method="POST", + resource_path="/api/external_repos", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +274,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +284,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +317,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +344,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +377,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +404,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +437,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, external_repo_id, @@ -523,37 +464,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_id is not None: - _path_params['external_repo_id'] = external_repo_id + _path_params["external_repo_id"] = external_repo_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/external_repos/{external_repo_id}', + method="DELETE", + resource_path="/api/external_repos/{external_repo_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +496,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +506,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +539,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepo", + "200": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +566,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +599,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepo", + "200": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +626,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +659,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( external_repo_id=external_repo_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepo", + "200": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, external_repo_id, @@ -777,44 +686,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_id is not None: - _path_params['external_repo_id'] = external_repo_id + _path_params["external_repo_id"] = external_repo_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/external_repos/{external_repo_id}', + method="GET", + resource_path="/api/external_repos/{external_repo_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,33 +722,48 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - remote_url: Annotated[Optional[StrictStr], Field(description="Substring matched search string on repository remote URL.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + remote_url: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on repository remote URL."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -903,7 +816,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -920,44 +833,58 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoList", + "200": "ExternalRepoList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - remote_url: Annotated[Optional[StrictStr], Field(description="Substring matched search string on repository remote URL.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + remote_url: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on repository remote URL."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1010,7 +937,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1027,44 +954,58 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoList", + "200": "ExternalRepoList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - remote_url: Annotated[Optional[StrictStr], Field(description="Substring matched search string on repository remote URL.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + remote_url: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on repository remote URL."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1117,7 +1058,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1134,19 +1075,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepoList", + "200": "ExternalRepoList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -1168,86 +1105,75 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if remote_url is not None: - - _query_params.append(('remote_url', remote_url)) - + + _query_params.append(("remote_url", remote_url)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/external_repos', + method="GET", + resource_path="/api/external_repos", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1257,12 +1183,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1271,10 +1194,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1309,7 +1229,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_id=external_repo_id, @@ -1317,23 +1237,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepo", + "200": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1342,10 +1258,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1380,7 +1293,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_id=external_repo_id, @@ -1388,23 +1301,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepo", + "200": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1413,10 +1322,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1451,7 +1357,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( external_repo_id=external_repo_id, @@ -1459,19 +1365,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExternalRepo", + "200": "ExternalRepo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, external_repo_id, @@ -1484,21 +1386,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if external_repo_id is not None: - _path_params['external_repo_id'] = external_repo_id + _path_params["external_repo_id"] = external_repo_id # process the query parameters # process the header parameters # process the form parameters @@ -1506,37 +1405,24 @@ def _update_serialize( if external_repo_update is not None: _body_params = external_repo_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/external_repos/{external_repo_id}', + method="PATCH", + resource_path="/api/external_repos/{external_repo_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1546,7 +1432,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/fine_tuning_jobs_api.py b/saturn_api/api/fine_tuning_jobs_api.py new file mode 100644 index 0000000..1bd58a6 --- /dev/null +++ b/saturn_api/api/fine_tuning_jobs_api.py @@ -0,0 +1,1075 @@ +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Dict, List, Optional, Tuple, Union + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse +from saturn_api.models.fine_tune_job_create import FineTuneJobCreate +from saturn_api.models.fine_tune_job_list import FineTuneJobList +from saturn_api.models.fine_tune_job_view import FineTuneJobView +from saturn_api.rest import RESTResponseType + + +class FineTuningJobsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + async def create( + self, + org_id: StrictStr, + fine_tune_job_create: FineTuneJobCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FineTuneJobView: + """Create fine-tuning job + + Create a new fine-tuning job. + + :param org_id: (required) + :type org_id: str + :param fine_tune_job_create: (required) + :type fine_tune_job_create: FineTuneJobCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + fine_tune_job_create=fine_tune_job_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def create_with_http_info( + self, + org_id: StrictStr, + fine_tune_job_create: FineTuneJobCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FineTuneJobView]: + """Create fine-tuning job + + Create a new fine-tuning job. + + :param org_id: (required) + :type org_id: str + :param fine_tune_job_create: (required) + :type fine_tune_job_create: FineTuneJobCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + fine_tune_job_create=fine_tune_job_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def create_without_preload_content( + self, + org_id: StrictStr, + fine_tune_job_create: FineTuneJobCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create fine-tuning job + + Create a new fine-tuning job. + + :param org_id: (required) + :type org_id: str + :param fine_tune_job_create: (required) + :type fine_tune_job_create: FineTuneJobCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + fine_tune_job_create=fine_tune_job_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_serialize( + self, + org_id, + fine_tune_job_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if fine_tune_job_create is not None: + _body_params = fine_tune_job_create + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/fine-tuning/jobs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def get( + self, + org_id: StrictStr, + job_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FineTuneJobView: + """Get fine-tuning job + + Get a fine-tuning job. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def get_with_http_info( + self, + org_id: StrictStr, + job_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FineTuneJobView]: + """Get fine-tuning job + + Get a fine-tuning job. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def get_without_preload_content( + self, + org_id: StrictStr, + job_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get fine-tuning job + + Get a fine-tuning job. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_serialize( + self, + org_id, + job_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if job_id is not None: + _path_params["job_id"] = job_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def jobs_cancel( + self, + org_id: StrictStr, + job_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FineTuneJobView: + """Cancel fine-tuning job + + Stop the underlying intermittent deployment. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._jobs_cancel_serialize( + org_id=org_id, + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def jobs_cancel_with_http_info( + self, + org_id: StrictStr, + job_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FineTuneJobView]: + """Cancel fine-tuning job + + Stop the underlying intermittent deployment. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._jobs_cancel_serialize( + org_id=org_id, + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def jobs_cancel_without_preload_content( + self, + org_id: StrictStr, + job_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel fine-tuning job + + Stop the underlying intermittent deployment. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._jobs_cancel_serialize( + org_id=org_id, + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _jobs_cancel_serialize( + self, + org_id, + job_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if job_id is not None: + _path_params["job_id"] = job_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def list( + self, + org_id: StrictStr, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FineTuneJobList: + """List fine-tuning jobs + + Paginated list of fine-tuning jobs. + + :param org_id: (required) + :type org_id: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def list_with_http_info( + self, + org_id: StrictStr, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FineTuneJobList]: + """List fine-tuning jobs + + Paginated list of fine-tuning jobs. + + :param org_id: (required) + :type org_id: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def list_without_preload_content( + self, + org_id: StrictStr, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List fine-tuning jobs + + Paginated list of fine-tuning jobs. + + :param org_id: (required) + :type org_id: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FineTuneJobList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_serialize( + self, + org_id, + prev_key, + next_key, + page_size, + descending, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + if prev_key is not None: + + _query_params.append(("prev_key", prev_key)) + + if next_key is not None: + + _query_params.append(("next_key", next_key)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + if descending is not None: + + _query_params.append(("descending", descending)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/fine-tuning/jobs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/saturn_api/api/groups_api.py b/saturn_api/api/groups_api.py index f2b98cb..b8a9ad1 100644 --- a/saturn_api/api/groups_api.py +++ b/saturn_api/api/groups_api.py @@ -1,24 +1,22 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.daily_usage_list import DailyUsageList from saturn_api.models.group import Group from saturn_api.models.group_create import GroupCreate @@ -27,9 +25,6 @@ from saturn_api.models.group_member_create import GroupMemberCreate from saturn_api.models.group_member_list import GroupMemberList from saturn_api.models.group_update import GroupUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -45,7 +40,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -53,10 +47,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,30 +80,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( group_create=group_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Group", + "201": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -120,10 +107,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -156,30 +140,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( group_create=group_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Group", + "201": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -187,10 +167,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,26 +200,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( group_create=group_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Group", + "201": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, group_create, @@ -254,16 +227,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -274,37 +244,24 @@ def _create_serialize( if group_create is not None: _body_params = group_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/groups', + method="POST", + resource_path="/api/groups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -314,12 +271,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_member( self, @@ -328,10 +282,7 @@ async def create_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -365,7 +316,7 @@ async def create_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( group_id=group_id, @@ -373,23 +324,19 @@ async def create_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "GroupMember", + "201": "GroupMember", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_member_with_http_info( self, @@ -398,10 +345,7 @@ async def create_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -435,7 +379,7 @@ async def create_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( group_id=group_id, @@ -443,23 +387,19 @@ async def create_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "GroupMember", + "201": "GroupMember", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_member_without_preload_content( self, @@ -468,10 +408,7 @@ async def create_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -505,7 +442,7 @@ async def create_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( group_id=group_id, @@ -513,19 +450,15 @@ async def create_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "GroupMember", + "201": "GroupMember", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_member_serialize( self, group_id, @@ -538,21 +471,18 @@ def _create_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters # process the header parameters # process the form parameters @@ -560,37 +490,24 @@ def _create_member_serialize( if group_member_create is not None: _body_params = group_member_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/groups/{group_id}/members', + method="POST", + resource_path="/api/groups/{group_id}/members", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -600,12 +517,9 @@ def _create_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -613,10 +527,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -649,30 +560,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -680,10 +587,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -716,30 +620,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -747,10 +647,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -783,26 +680,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, group_id, @@ -814,37 +707,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/groups/{group_id}', + method="DELETE", + resource_path="/api/groups/{group_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -854,12 +739,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_member( self, @@ -868,10 +750,7 @@ async def delete_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -905,7 +784,7 @@ async def delete_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( group_id=group_id, @@ -913,23 +792,19 @@ async def delete_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_member_with_http_info( self, @@ -938,10 +813,7 @@ async def delete_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -975,7 +847,7 @@ async def delete_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( group_id=group_id, @@ -983,23 +855,19 @@ async def delete_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_member_without_preload_content( self, @@ -1008,10 +876,7 @@ async def delete_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1045,7 +910,7 @@ async def delete_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( group_id=group_id, @@ -1053,19 +918,15 @@ async def delete_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_member_serialize( self, group_id, @@ -1078,41 +939,33 @@ def _delete_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/groups/{group_id}/members', + method="DELETE", + resource_path="/api/groups/{group_id}/members", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1122,12 +975,9 @@ def _delete_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -1135,10 +985,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1171,30 +1018,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Group", + "200": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -1202,10 +1045,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1238,30 +1078,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Group", + "200": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -1269,10 +1105,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1305,26 +1138,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Group", + "200": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, group_id, @@ -1336,44 +1165,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/groups/{group_id}', + method="GET", + resource_path="/api/groups/{group_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1383,12 +1201,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_daily_usage( self, @@ -1398,10 +1213,7 @@ async def get_daily_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1438,7 +1250,7 @@ async def get_daily_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( group_id=group_id, @@ -1447,23 +1259,19 @@ async def get_daily_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_daily_usage_with_http_info( self, @@ -1473,10 +1281,7 @@ async def get_daily_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1513,7 +1318,7 @@ async def get_daily_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( group_id=group_id, @@ -1522,23 +1327,19 @@ async def get_daily_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_daily_usage_without_preload_content( self, @@ -1548,10 +1349,7 @@ async def get_daily_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1588,7 +1386,7 @@ async def get_daily_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( group_id=group_id, @@ -1597,19 +1395,15 @@ async def get_daily_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_daily_usage_serialize( self, group_id, @@ -1623,70 +1417,49 @@ def _get_daily_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/groups/{group_id}/usage/daily', + method="GET", + resource_path="/api/groups/{group_id}/usage/daily", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1696,29 +1469,40 @@ def _get_daily_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group name.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Org ID to query for groups. Defaults to the default org for the authenticated user.")] = None, - all_groups: Annotated[Optional[StrictBool], Field(description="Search for all groups in the org, instead of only groups the authenticated user is a member of.")] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on group name.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], + Field( + description="Org ID to query for groups. Defaults to the default org for the authenticated user." + ), + ] = None, + all_groups: Annotated[ + Optional[StrictBool], + Field( + description="Search for all groups in the org, instead of only groups the authenticated user is a member of." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1763,7 +1547,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1776,40 +1560,50 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupList", + "200": "GroupList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group name.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Org ID to query for groups. Defaults to the default org for the authenticated user.")] = None, - all_groups: Annotated[Optional[StrictBool], Field(description="Search for all groups in the org, instead of only groups the authenticated user is a member of.")] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on group name.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], + Field( + description="Org ID to query for groups. Defaults to the default org for the authenticated user." + ), + ] = None, + all_groups: Annotated[ + Optional[StrictBool], + Field( + description="Search for all groups in the org, instead of only groups the authenticated user is a member of." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1854,7 +1648,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1867,40 +1661,50 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupList", + "200": "GroupList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group name.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Org ID to query for groups. Defaults to the default org for the authenticated user.")] = None, - all_groups: Annotated[Optional[StrictBool], Field(description="Search for all groups in the org, instead of only groups the authenticated user is a member of.")] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on group name.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], + Field( + description="Org ID to query for groups. Defaults to the default org for the authenticated user." + ), + ] = None, + all_groups: Annotated[ + Optional[StrictBool], + Field( + description="Search for all groups in the org, instead of only groups the authenticated user is a member of." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1945,7 +1749,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1958,19 +1762,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupList", + "200": "GroupList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, name, @@ -1988,70 +1788,59 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if all_groups is not None: - - _query_params.append(('all_groups', all_groups)) - + + _query_params.append(("all_groups", all_groups)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/groups', + method="GET", + resource_path="/api/groups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2061,28 +1850,30 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_members( self, group_id: StrictStr, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group member username.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on group member username."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2124,7 +1915,7 @@ async def list_members( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_members_serialize( group_id=group_id, @@ -2136,39 +1927,40 @@ async def list_members( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupMemberList", + "200": "GroupMemberList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_members_with_http_info( self, group_id: StrictStr, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group member username.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on group member username."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2210,7 +2002,7 @@ async def list_members_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_members_serialize( group_id=group_id, @@ -2222,39 +2014,40 @@ async def list_members_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupMemberList", + "200": "GroupMemberList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_members_without_preload_content( self, group_id: StrictStr, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on group member username.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on group member username."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2296,7 +2089,7 @@ async def list_members_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_members_serialize( group_id=group_id, @@ -2308,19 +2101,15 @@ async def list_members_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupMemberList", + "200": "GroupMemberList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_members_serialize( self, group_id, @@ -2337,64 +2126,53 @@ def _list_members_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/groups/{group_id}/members', + method="GET", + resource_path="/api/groups/{group_id}/members", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2404,12 +2182,9 @@ def _list_members_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -2418,10 +2193,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2456,7 +2228,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( group_id=group_id, @@ -2464,23 +2236,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Group", + "200": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -2489,10 +2257,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2527,7 +2292,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( group_id=group_id, @@ -2535,23 +2300,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Group", + "200": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -2560,10 +2321,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2598,7 +2356,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( group_id=group_id, @@ -2606,19 +2364,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Group", + "200": "Group", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, group_id, @@ -2631,21 +2385,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if group_id is not None: - _path_params['group_id'] = group_id + _path_params["group_id"] = group_id # process the query parameters # process the header parameters # process the form parameters @@ -2653,37 +2404,24 @@ def _update_serialize( if group_update is not None: _body_params = group_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/groups/{group_id}', + method="PATCH", + resource_path="/api/groups/{group_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2693,7 +2431,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/image_tags_api.py b/saturn_api/api/image_tags_api.py index 279b42c..9124d6d 100644 --- a/saturn_api/api/image_tags_api.py +++ b/saturn_api/api/image_tags_api.py @@ -1,23 +1,21 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.image_build_status import ImageBuildStatus from saturn_api.models.image_tag import ImageTag @@ -26,9 +24,6 @@ from saturn_api.models.image_tag_update import ImageTagUpdate from saturn_api.models.job_runtime_summary import JobRuntimeSummary from saturn_api.models.resource_history import ResourceHistory - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -44,7 +39,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -53,10 +47,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -91,7 +82,7 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_id=image_id, @@ -99,23 +90,19 @@ async def create( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ImageTag", + "201": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -124,10 +111,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,7 +146,7 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_id=image_id, @@ -170,23 +154,19 @@ async def create_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ImageTag", + "201": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -195,10 +175,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -233,7 +210,7 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_id=image_id, @@ -241,19 +218,15 @@ async def create_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ImageTag", + "201": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, image_id, @@ -266,21 +239,18 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id # process the query parameters # process the header parameters # process the form parameters @@ -288,37 +258,24 @@ def _create_serialize( if image_tag_create is not None: _body_params = image_tag_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/images/{image_id}/tags', + method="POST", + resource_path="/api/images/{image_id}/tags", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -328,12 +285,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -342,10 +296,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -380,7 +331,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, @@ -388,23 +339,19 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -413,10 +360,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -451,7 +395,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, @@ -459,23 +403,19 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -484,10 +424,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -522,7 +459,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, @@ -530,19 +467,15 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, image_id, @@ -555,39 +488,31 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/images/{image_id}/tags/{image_tag_id}', + method="DELETE", + resource_path="/api/images/{image_id}/tags/{image_tag_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -597,12 +522,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -611,10 +533,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -649,7 +568,7 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, @@ -657,23 +576,19 @@ async def get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -682,10 +597,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -720,7 +632,7 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, @@ -728,23 +640,19 @@ async def get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -753,10 +661,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -791,7 +696,7 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, @@ -799,19 +704,15 @@ async def get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, image_id, @@ -824,46 +725,35 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images/{image_id}/tags/{image_tag_id}', + method="GET", + resource_path="/api/images/{image_id}/tags/{image_tag_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -873,29 +763,30 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_logs( self, image_id: StrictStr, image_tag_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -940,7 +831,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( image_id=image_id, @@ -953,40 +844,40 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_logs_with_http_info( self, image_id: StrictStr, image_tag_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1031,7 +922,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( image_id=image_id, @@ -1044,40 +935,40 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_logs_without_preload_content( self, image_id: StrictStr, image_tag_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1122,7 +1013,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( image_id=image_id, @@ -1135,19 +1026,15 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_serialize( self, image_id, @@ -1165,66 +1052,55 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters if pod_name is not None: - - _query_params.append(('pod_name', pod_name)) - + + _query_params.append(("pod_name", pod_name)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images/{image_id}/tags/{image_tag_id}/logs', + method="GET", + resource_path="/api/images/{image_id}/tags/{image_tag_id}/logs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1234,12 +1110,9 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_runtime_summary( self, @@ -1248,10 +1121,7 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1286,7 +1156,7 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( image_id=image_id, @@ -1294,23 +1164,19 @@ async def get_runtime_summary( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRuntimeSummary", + "200": "JobRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_runtime_summary_with_http_info( self, @@ -1319,10 +1185,7 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1357,7 +1220,7 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( image_id=image_id, @@ -1365,23 +1228,19 @@ async def get_runtime_summary_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRuntimeSummary", + "200": "JobRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_runtime_summary_without_preload_content( self, @@ -1390,10 +1249,7 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1428,7 +1284,7 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( image_id=image_id, @@ -1436,19 +1292,15 @@ async def get_runtime_summary_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRuntimeSummary", + "200": "JobRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_runtime_summary_serialize( self, image_id, @@ -1461,46 +1313,35 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images/{image_id}/tags/{image_tag_id}/runtimesummary', + method="GET", + resource_path="/api/images/{image_id}/tags/{image_tag_id}/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1510,12 +1351,9 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_status_history( self, @@ -1524,10 +1362,7 @@ async def get_status_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1561,7 +1396,7 @@ async def get_status_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_status_history_serialize( image_id=image_id, @@ -1569,23 +1404,19 @@ async def get_status_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_status_history_with_http_info( self, @@ -1594,10 +1425,7 @@ async def get_status_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1631,7 +1459,7 @@ async def get_status_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_status_history_serialize( image_id=image_id, @@ -1639,23 +1467,19 @@ async def get_status_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_status_history_without_preload_content( self, @@ -1664,10 +1488,7 @@ async def get_status_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1701,7 +1522,7 @@ async def get_status_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_status_history_serialize( image_id=image_id, @@ -1709,19 +1530,15 @@ async def get_status_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_status_history_serialize( self, image_id, @@ -1734,46 +1551,35 @@ def _get_status_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images/{image_id}/tags/{image_tag_id}/history', + method="GET", + resource_path="/api/images/{image_id}/tags/{image_tag_id}/history", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1783,32 +1589,43 @@ def _get_status_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, image_id: StrictStr, - version: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag version.")] = None, - image_uri: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag URI.")] = None, - is_external: Annotated[Optional[StrictBool], Field(description="Filter image tags by is_external.")] = None, - archived: Annotated[Optional[StrictBool], Field(description="Filter images tags by archived.")] = None, - status: Annotated[Optional[ImageBuildStatus], Field(description="Filter image tags by build status.")] = None, + version: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on image tag version."), + ] = None, + image_uri: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on image tag URI."), + ] = None, + is_external: Annotated[ + Optional[StrictBool], Field(description="Filter image tags by is_external.") + ] = None, + archived: Annotated[ + Optional[StrictBool], Field(description="Filter images tags by archived.") + ] = None, + status: Annotated[ + Optional[ImageBuildStatus], Field(description="Filter image tags by build status.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1859,7 +1676,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( image_id=image_id, @@ -1875,43 +1692,53 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTagList", + "200": "ImageTagList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, image_id: StrictStr, - version: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag version.")] = None, - image_uri: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag URI.")] = None, - is_external: Annotated[Optional[StrictBool], Field(description="Filter image tags by is_external.")] = None, - archived: Annotated[Optional[StrictBool], Field(description="Filter images tags by archived.")] = None, - status: Annotated[Optional[ImageBuildStatus], Field(description="Filter image tags by build status.")] = None, + version: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on image tag version."), + ] = None, + image_uri: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on image tag URI."), + ] = None, + is_external: Annotated[ + Optional[StrictBool], Field(description="Filter image tags by is_external.") + ] = None, + archived: Annotated[ + Optional[StrictBool], Field(description="Filter images tags by archived.") + ] = None, + status: Annotated[ + Optional[ImageBuildStatus], Field(description="Filter image tags by build status.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1962,7 +1789,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( image_id=image_id, @@ -1978,43 +1805,53 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTagList", + "200": "ImageTagList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, image_id: StrictStr, - version: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag version.")] = None, - image_uri: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image tag URI.")] = None, - is_external: Annotated[Optional[StrictBool], Field(description="Filter image tags by is_external.")] = None, - archived: Annotated[Optional[StrictBool], Field(description="Filter images tags by archived.")] = None, - status: Annotated[Optional[ImageBuildStatus], Field(description="Filter image tags by build status.")] = None, + version: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on image tag version."), + ] = None, + image_uri: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on image tag URI."), + ] = None, + is_external: Annotated[ + Optional[StrictBool], Field(description="Filter image tags by is_external.") + ] = None, + archived: Annotated[ + Optional[StrictBool], Field(description="Filter images tags by archived.") + ] = None, + status: Annotated[ + Optional[ImageBuildStatus], Field(description="Filter image tags by build status.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2065,7 +1902,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( image_id=image_id, @@ -2081,19 +1918,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTagList", + "200": "ImageTagList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, image_id, @@ -2114,80 +1947,69 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id # process the query parameters if version is not None: - - _query_params.append(('version', version)) - + + _query_params.append(("version", version)) + if image_uri is not None: - - _query_params.append(('image_uri', image_uri)) - + + _query_params.append(("image_uri", image_uri)) + if is_external is not None: - - _query_params.append(('is_external', is_external)) - + + _query_params.append(("is_external", is_external)) + if archived is not None: - - _query_params.append(('archived', archived)) - + + _query_params.append(("archived", archived)) + if status is not None: - - _query_params.append(('status', status.value)) - + + _query_params.append(("status", status.value)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images/{image_id}/tags', + method="GET", + resource_path="/api/images/{image_id}/tags", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2197,12 +2019,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def stop( self, @@ -2211,10 +2030,7 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2248,7 +2064,7 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( image_id=image_id, @@ -2256,23 +2072,19 @@ async def stop( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def stop_with_http_info( self, @@ -2281,10 +2093,7 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2318,7 +2127,7 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( image_id=image_id, @@ -2326,23 +2135,19 @@ async def stop_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def stop_without_preload_content( self, @@ -2351,10 +2156,7 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2388,7 +2190,7 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( image_id=image_id, @@ -2396,19 +2198,15 @@ async def stop_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_serialize( self, image_id, @@ -2421,46 +2219,35 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/images/{image_id}/tags/{image_tag_id}/stop', + method="POST", + resource_path="/api/images/{image_id}/tags/{image_tag_id}/stop", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2470,12 +2257,9 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -2485,10 +2269,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2525,7 +2306,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -2534,23 +2315,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -2560,10 +2337,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2600,7 +2374,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -2609,23 +2383,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -2635,10 +2405,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2675,7 +2442,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -2684,19 +2451,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageTag", + "200": "ImageTag", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, image_id, @@ -2710,23 +2473,20 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id if image_tag_id is not None: - _path_params['image_tag_id'] = image_tag_id + _path_params["image_tag_id"] = image_tag_id # process the query parameters # process the header parameters # process the form parameters @@ -2734,37 +2494,24 @@ def _update_serialize( if image_tag_update is not None: _body_params = image_tag_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/images/{image_id}/tags/{image_tag_id}', + method="PATCH", + resource_path="/api/images/{image_id}/tags/{image_tag_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2774,7 +2521,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/images_api.py b/saturn_api/api/images_api.py index 7a2f421..35e8676 100644 --- a/saturn_api/api/images_api.py +++ b/saturn_api/api/images_api.py @@ -1,32 +1,35 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image import Image from saturn_api.models.image_access_level import ImageAccessLevel from saturn_api.models.image_create import ImageCreate from saturn_api.models.image_list import ImageList from saturn_api.models.image_update import ImageUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -42,7 +45,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -50,10 +52,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -86,30 +85,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_create=image_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Image", + "201": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -117,10 +112,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,30 +145,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_create=image_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Image", + "201": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -184,10 +172,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -220,26 +205,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( image_create=image_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Image", + "201": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, image_create, @@ -251,16 +232,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -271,37 +249,24 @@ def _create_serialize( if image_create is not None: _body_params = image_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/images', + method="POST", + resource_path="/api/images", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -311,12 +276,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -324,10 +286,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -360,30 +319,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -391,10 +346,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -427,30 +379,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -458,10 +406,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -494,26 +439,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, image_id, @@ -525,37 +466,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/images/{image_id}', + method="DELETE", + resource_path="/api/images/{image_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -565,12 +498,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -578,10 +508,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -614,30 +541,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Image", + "200": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -645,10 +568,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -681,30 +601,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Image", + "200": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -712,10 +628,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -748,26 +661,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Image", + "200": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, image_id, @@ -779,44 +688,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images/{image_id}', + method="GET", + resource_path="/api/images/{image_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -826,37 +724,60 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image name.")] = None, - access: Annotated[Optional[ImageAccessLevel], Field(description="Filter images by access level.")] = None, - supports: Annotated[Optional[StrictStr], Field(description="Filter images by supported features.")] = None, - hardware_type: Annotated[Optional[HardwareType], Field(description="Filter images by hardware type.")] = None, - is_base: Annotated[Optional[StrictBool], Field(description="Filter for images that are or are not base images.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on image name.") + ] = None, + access: Annotated[ + Optional[ImageAccessLevel], Field(description="Filter images by access level.") + ] = None, + supports: Annotated[ + Optional[StrictStr], Field(description="Filter images by supported features.") + ] = None, + hardware_type: Annotated[ + Optional[HardwareType], Field(description="Filter images by hardware type.") + ] = None, + is_base: Annotated[ + Optional[StrictBool], + Field(description="Filter for images that are or are not base images."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -917,7 +838,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -938,48 +859,70 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageList", + "200": "ImageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image name.")] = None, - access: Annotated[Optional[ImageAccessLevel], Field(description="Filter images by access level.")] = None, - supports: Annotated[Optional[StrictStr], Field(description="Filter images by supported features.")] = None, - hardware_type: Annotated[Optional[HardwareType], Field(description="Filter images by hardware type.")] = None, - is_base: Annotated[Optional[StrictBool], Field(description="Filter for images that are or are not base images.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on image name.") + ] = None, + access: Annotated[ + Optional[ImageAccessLevel], Field(description="Filter images by access level.") + ] = None, + supports: Annotated[ + Optional[StrictStr], Field(description="Filter images by supported features.") + ] = None, + hardware_type: Annotated[ + Optional[HardwareType], Field(description="Filter images by hardware type.") + ] = None, + is_base: Annotated[ + Optional[StrictBool], + Field(description="Filter for images that are or are not base images."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1040,7 +983,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1061,48 +1004,70 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageList", + "200": "ImageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on image name.")] = None, - access: Annotated[Optional[ImageAccessLevel], Field(description="Filter images by access level.")] = None, - supports: Annotated[Optional[StrictStr], Field(description="Filter images by supported features.")] = None, - hardware_type: Annotated[Optional[HardwareType], Field(description="Filter images by hardware type.")] = None, - is_base: Annotated[Optional[StrictBool], Field(description="Filter for images that are or are not base images.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on image name.") + ] = None, + access: Annotated[ + Optional[ImageAccessLevel], Field(description="Filter images by access level.") + ] = None, + supports: Annotated[ + Optional[StrictStr], Field(description="Filter images by supported features.") + ] = None, + hardware_type: Annotated[ + Optional[HardwareType], Field(description="Filter images by hardware type.") + ] = None, + is_base: Annotated[ + Optional[StrictBool], + Field(description="Filter for images that are or are not base images."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1163,7 +1128,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1184,19 +1149,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageList", + "200": "ImageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -1222,102 +1183,91 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if access is not None: - - _query_params.append(('access', access.value)) - + + _query_params.append(("access", access.value)) + if supports is not None: - - _query_params.append(('supports', supports)) - + + _query_params.append(("supports", supports)) + if hardware_type is not None: - - _query_params.append(('hardware_type', hardware_type.value)) - + + _query_params.append(("hardware_type", hardware_type.value)) + if is_base is not None: - - _query_params.append(('is_base', is_base)) - + + _query_params.append(("is_base", is_base)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/images', + method="GET", + resource_path="/api/images", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1327,12 +1277,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1341,10 +1288,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1379,7 +1323,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -1387,23 +1331,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Image", + "200": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1412,10 +1352,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1450,7 +1387,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -1458,23 +1395,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Image", + "200": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1483,10 +1416,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1521,7 +1451,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( image_id=image_id, @@ -1529,19 +1459,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Image", + "200": "Image", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, image_id, @@ -1554,21 +1480,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if image_id is not None: - _path_params['image_id'] = image_id + _path_params["image_id"] = image_id # process the query parameters # process the header parameters # process the form parameters @@ -1576,37 +1499,24 @@ def _update_serialize( if image_update is not None: _body_params = image_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/images/{image_id}', + method="PATCH", + resource_path="/api/images/{image_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1616,7 +1526,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/info_api.py b/saturn_api/api/info_api.py index 2b7c1d1..c9e48ed 100644 --- a/saturn_api/api/info_api.py +++ b/saturn_api/api/info_api.py @@ -1,25 +1,23 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from saturn_api.models.app_info import AppInfo -from saturn_api.models.server_options import ServerOptions +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.app_info import AppInfo +from saturn_api.models.server_options import ServerOptions from saturn_api.rest import RESTResponseType @@ -35,17 +33,13 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def get( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,39 +70,32 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AppInfo", + "200": "AppInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -139,39 +126,32 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AppInfo", + "200": "AppInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -202,25 +182,21 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AppInfo", + "200": "AppInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, _request_auth, @@ -231,16 +207,13 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -249,24 +222,16 @@ def _get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/info', + method="GET", + resource_path="/api/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -276,22 +241,16 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -322,39 +281,32 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServerOptions", + "200": "ServerOptions", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -385,39 +337,32 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServerOptions", + "200": "ServerOptions", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -448,25 +393,21 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServerOptions", + "200": "ServerOptions", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_options_serialize( self, _request_auth, @@ -477,16 +418,13 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -495,24 +433,16 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/info/servers', + method="GET", + resource_path="/api/info/servers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -522,7 +452,5 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/invitations_api.py b/saturn_api/api/invitations_api.py index 568e89b..24ec00f 100644 --- a/saturn_api/api/invitations_api.py +++ b/saturn_api/api/invitations_api.py @@ -1,31 +1,26 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.invitation import Invitation from saturn_api.models.invitation_create import InvitationCreate from saturn_api.models.invitation_list import InvitationList from saturn_api.models.invitation_status import InvitationStatus from saturn_api.models.invitation_update import InvitationUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -41,7 +36,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -49,10 +43,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,30 +76,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( invitation_create=invitation_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Invitation", + "201": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -116,10 +103,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,30 +136,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( invitation_create=invitation_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Invitation", + "201": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -183,10 +163,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,26 +196,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( invitation_create=invitation_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Invitation", + "201": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, invitation_create, @@ -250,16 +223,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,37 +240,24 @@ def _create_serialize( if invitation_create is not None: _body_params = invitation_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/invitations', + method="POST", + resource_path="/api/invitations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -310,12 +267,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -323,10 +277,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -359,30 +310,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -390,10 +337,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -426,30 +370,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -457,10 +397,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -493,26 +430,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, invitation_id, @@ -524,37 +457,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if invitation_id is not None: - _path_params['invitation_id'] = invitation_id + _path_params["invitation_id"] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/invitations/{invitation_id}', + method="DELETE", + resource_path="/api/invitations/{invitation_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -564,12 +489,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -577,10 +499,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -613,30 +532,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invitation", + "200": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -644,10 +559,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -680,30 +592,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invitation", + "200": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -711,10 +619,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -747,26 +652,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( invitation_id=invitation_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invitation", + "200": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, invitation_id, @@ -778,44 +679,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if invitation_id is not None: - _path_params['invitation_id'] = invitation_id + _path_params["invitation_id"] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/invitations/{invitation_id}', + method="GET", + resource_path="/api/invitations/{invitation_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -825,29 +715,34 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - status: Annotated[Optional[InvitationStatus], Field(description="Filter invitations by status.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, - invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, + status: Annotated[ + Optional[InvitationStatus], Field(description="Filter invitations by status.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on email.") + ] = None, + invitor_id: Annotated[ + Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -892,7 +787,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( status=status, @@ -905,40 +800,44 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "InvitationList", + "200": "InvitationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - status: Annotated[Optional[InvitationStatus], Field(description="Filter invitations by status.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, - invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, + status: Annotated[ + Optional[InvitationStatus], Field(description="Filter invitations by status.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on email.") + ] = None, + invitor_id: Annotated[ + Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -983,7 +882,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( status=status, @@ -996,40 +895,44 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "InvitationList", + "200": "InvitationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - status: Annotated[Optional[InvitationStatus], Field(description="Filter invitations by status.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, - invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, + status: Annotated[ + Optional[InvitationStatus], Field(description="Filter invitations by status.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on email.") + ] = None, + invitor_id: Annotated[ + Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1074,7 +977,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( status=status, @@ -1087,19 +990,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "InvitationList", + "200": "InvitationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, status, @@ -1117,70 +1016,59 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if status is not None: - - _query_params.append(('status', status.value)) - + + _query_params.append(("status", status.value)) + if email is not None: - - _query_params.append(('email', email)) - + + _query_params.append(("email", email)) + if invitor_id is not None: - - _query_params.append(('invitor_id', invitor_id)) - + + _query_params.append(("invitor_id", invitor_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/invitations', + method="GET", + resource_path="/api/invitations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1190,12 +1078,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1204,10 +1089,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1242,7 +1124,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( invitation_id=invitation_id, @@ -1250,23 +1132,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invitation", + "200": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1275,10 +1153,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1313,7 +1188,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( invitation_id=invitation_id, @@ -1321,23 +1196,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invitation", + "200": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1346,10 +1217,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1384,7 +1252,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( invitation_id=invitation_id, @@ -1392,19 +1260,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invitation", + "200": "Invitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, invitation_id, @@ -1417,21 +1281,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if invitation_id is not None: - _path_params['invitation_id'] = invitation_id + _path_params["invitation_id"] = invitation_id # process the query parameters # process the header parameters # process the form parameters @@ -1439,37 +1300,24 @@ def _update_serialize( if invitation_update is not None: _body_params = invitation_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/invitations/{invitation_id}', + method="PATCH", + resource_path="/api/invitations/{invitation_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1479,7 +1327,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/jobs_api.py b/saturn_api/api/jobs_api.py index 711cc49..1f3aa0f 100644 --- a/saturn_api/api/jobs_api.py +++ b/saturn_api/api/jobs_api.py @@ -1,24 +1,30 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.cron_schedule_update import CronScheduleUpdate from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.job import Job @@ -42,10 +48,9 @@ from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate from saturn_api.models.service_account_attachment import ServiceAccountAttachment -from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse +from saturn_api.models.service_account_create_attachment import ( + ServiceAccountCreateAttachment, +) from saturn_api.rest import RESTResponseType @@ -61,7 +66,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -69,10 +73,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -105,30 +106,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( job_create=job_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Job", + "201": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -136,10 +133,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -172,30 +166,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( job_create=job_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Job", + "201": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -203,10 +193,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -239,26 +226,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( job_create=job_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Job", + "201": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, job_create, @@ -270,16 +253,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -290,37 +270,24 @@ def _create_serialize( if job_create is not None: _body_params = job_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs', + method="POST", + resource_path="/api/jobs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -330,12 +297,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_resource_template( self, @@ -343,10 +307,7 @@ async def create_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -378,30 +339,26 @@ async def create_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_resource_template_with_http_info( self, @@ -409,10 +366,7 @@ async def create_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -444,30 +398,26 @@ async def create_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_resource_template_without_preload_content( self, @@ -475,10 +425,7 @@ async def create_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -510,26 +457,22 @@ async def create_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_resource_template_serialize( self, job_id, @@ -541,44 +484,33 @@ def _create_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/template', + method="POST", + resource_path="/api/jobs/{job_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -588,12 +520,9 @@ def _create_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_secret_attachment( self, @@ -602,10 +531,7 @@ async def create_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -639,7 +565,7 @@ async def create_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( job_id=job_id, @@ -647,23 +573,19 @@ async def create_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_secret_attachment_with_http_info( self, @@ -672,10 +594,7 @@ async def create_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -709,7 +628,7 @@ async def create_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( job_id=job_id, @@ -717,23 +636,19 @@ async def create_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_secret_attachment_without_preload_content( self, @@ -742,10 +657,7 @@ async def create_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -779,7 +691,7 @@ async def create_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( job_id=job_id, @@ -787,19 +699,15 @@ async def create_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_secret_attachment_serialize( self, job_id, @@ -812,21 +720,18 @@ def _create_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -834,37 +739,24 @@ def _create_secret_attachment_serialize( if secret_attachment_create is not None: _body_params = secret_attachment_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/secrets', + method="POST", + resource_path="/api/jobs/{job_id}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -874,12 +766,9 @@ def _create_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_service_account_attachment( self, @@ -888,10 +777,7 @@ async def create_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -925,7 +811,7 @@ async def create_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( job_id=job_id, @@ -933,23 +819,19 @@ async def create_service_account_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_service_account_attachment_with_http_info( self, @@ -958,10 +840,7 @@ async def create_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -995,7 +874,7 @@ async def create_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( job_id=job_id, @@ -1003,23 +882,19 @@ async def create_service_account_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_service_account_attachment_without_preload_content( self, @@ -1028,10 +903,7 @@ async def create_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1065,7 +937,7 @@ async def create_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( job_id=job_id, @@ -1073,19 +945,15 @@ async def create_service_account_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_service_account_attachment_serialize( self, job_id, @@ -1098,21 +966,18 @@ def _create_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -1120,37 +985,24 @@ def _create_service_account_attachment_serialize( if service_account_create_attachment is not None: _body_params = service_account_create_attachment - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/jobs/{job_id}/service_account', + method="PUT", + resource_path="/api/jobs/{job_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1160,24 +1012,20 @@ def _create_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, job_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete job that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], Field(description="Force delete job that is currently active.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1212,7 +1060,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( job_id=job_id, @@ -1220,35 +1068,30 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, job_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete job that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], Field(description="Force delete job that is currently active.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1283,7 +1126,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( job_id=job_id, @@ -1291,35 +1134,30 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, job_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete job that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], Field(description="Force delete job that is currently active.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1354,7 +1192,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( job_id=job_id, @@ -1362,19 +1200,15 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, job_id, @@ -1387,41 +1221,33 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if allow_active is not None: - - _query_params.append(('allow_active', allow_active)) - + + _query_params.append(("allow_active", allow_active)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/jobs/{job_id}', + method="DELETE", + resource_path="/api/jobs/{job_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1431,12 +1257,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_secret_attachment( self, @@ -1445,10 +1268,7 @@ async def delete_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1482,7 +1302,7 @@ async def delete_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( job_id=job_id, @@ -1490,23 +1310,19 @@ async def delete_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_secret_attachment_with_http_info( self, @@ -1515,10 +1331,7 @@ async def delete_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1552,7 +1365,7 @@ async def delete_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( job_id=job_id, @@ -1560,23 +1373,19 @@ async def delete_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_secret_attachment_without_preload_content( self, @@ -1585,10 +1394,7 @@ async def delete_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1622,7 +1428,7 @@ async def delete_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( job_id=job_id, @@ -1630,19 +1436,15 @@ async def delete_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_secret_attachment_serialize( self, job_id, @@ -1655,39 +1457,31 @@ def _delete_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/jobs/{job_id}/secrets/{secret_attachment_id}', + method="DELETE", + resource_path="/api/jobs/{job_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1697,12 +1491,9 @@ def _delete_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_service_account_attachment( self, @@ -1710,10 +1501,7 @@ async def delete_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1745,30 +1533,26 @@ async def delete_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_service_account_attachment_with_http_info( self, @@ -1776,10 +1560,7 @@ async def delete_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1811,30 +1592,26 @@ async def delete_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_service_account_attachment_without_preload_content( self, @@ -1842,10 +1619,7 @@ async def delete_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1877,26 +1651,22 @@ async def delete_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_service_account_attachment_serialize( self, job_id, @@ -1908,37 +1678,29 @@ def _delete_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/jobs/{job_id}/service_account', + method="DELETE", + resource_path="/api/jobs/{job_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1948,12 +1710,9 @@ def _delete_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -1961,10 +1720,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1997,30 +1753,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -2028,10 +1780,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2064,30 +1813,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -2095,10 +1840,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2131,26 +1873,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, job_id, @@ -2162,44 +1900,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}', + method="GET", + resource_path="/api/jobs/{job_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2209,12 +1936,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_cluster_history( self, @@ -2222,10 +1946,7 @@ async def get_cluster_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2258,30 +1979,26 @@ async def get_cluster_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_cluster_history_with_http_info( self, @@ -2289,10 +2006,7 @@ async def get_cluster_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2325,30 +2039,26 @@ async def get_cluster_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_cluster_history_without_preload_content( self, @@ -2356,10 +2066,7 @@ async def get_cluster_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2392,26 +2099,22 @@ async def get_cluster_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_cluster_history_serialize( self, job_id, @@ -2423,44 +2126,33 @@ def _get_cluster_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/clusters', + method="GET", + resource_path="/api/jobs/{job_id}/clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2470,28 +2162,29 @@ def _get_cluster_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_logs( self, job_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2534,7 +2227,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( job_id=job_id, @@ -2546,39 +2239,39 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_logs_with_http_info( self, job_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2621,7 +2314,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( job_id=job_id, @@ -2633,39 +2326,39 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_logs_without_preload_content( self, job_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2708,7 +2401,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( job_id=job_id, @@ -2720,19 +2413,15 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_serialize( self, job_id, @@ -2749,64 +2438,53 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if pod_name is not None: - - _query_params.append(('pod_name', pod_name)) - + + _query_params.append(("pod_name", pod_name)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/logs', + method="GET", + resource_path="/api/jobs/{job_id}/logs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2816,28 +2494,32 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_metrics( self, job_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2880,7 +2562,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( job_id=job_id, @@ -2892,39 +2574,42 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_metrics_with_http_info( self, job_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2967,7 +2652,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( job_id=job_id, @@ -2979,39 +2664,42 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_metrics_without_preload_content( self, job_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3054,7 +2742,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( job_id=job_id, @@ -3066,19 +2754,15 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_metrics_serialize( self, job_id, @@ -3095,82 +2779,61 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if type is not None: - - _query_params.append(('type', type)) - + + _query_params.append(("type", type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if resolution is not None: - - _query_params.append(('resolution', resolution)) - + + _query_params.append(("resolution", resolution)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/metrics', + method="GET", + resource_path="/api/jobs/{job_id}/metrics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3180,24 +2843,20 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_pod_history( self, job_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3232,7 +2891,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( job_id=job_id, @@ -3240,35 +2899,30 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_pod_history_with_http_info( self, job_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3303,7 +2957,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( job_id=job_id, @@ -3311,35 +2965,30 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_pod_history_without_preload_content( self, job_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3374,7 +3023,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( job_id=job_id, @@ -3382,19 +3031,15 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_pod_history_serialize( self, job_id, @@ -3407,48 +3052,37 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/history', + method="GET", + resource_path="/api/jobs/{job_id}/history", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3458,12 +3092,9 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_recipe( self, @@ -3472,10 +3103,7 @@ async def get_recipe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3509,7 +3137,7 @@ async def get_recipe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( job_id=job_id, @@ -3517,23 +3145,19 @@ async def get_recipe( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRecipe", + "200": "JobRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_recipe_with_http_info( self, @@ -3542,10 +3166,7 @@ async def get_recipe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3579,7 +3200,7 @@ async def get_recipe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( job_id=job_id, @@ -3587,23 +3208,19 @@ async def get_recipe_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRecipe", + "200": "JobRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_recipe_without_preload_content( self, @@ -3612,10 +3229,7 @@ async def get_recipe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3649,7 +3263,7 @@ async def get_recipe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( job_id=job_id, @@ -3657,19 +3271,15 @@ async def get_recipe_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRecipe", + "200": "JobRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_recipe_serialize( self, job_id, @@ -3682,48 +3292,37 @@ def _get_recipe_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if as_template is not None: - - _query_params.append(('as_template', as_template)) - + + _query_params.append(("as_template", as_template)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/recipe', + method="GET", + resource_path="/api/jobs/{job_id}/recipe", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3733,12 +3332,9 @@ def _get_recipe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_resource_template( self, @@ -3746,10 +3342,7 @@ async def get_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3781,30 +3374,26 @@ async def get_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_resource_template_with_http_info( self, @@ -3812,10 +3401,7 @@ async def get_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3847,30 +3433,26 @@ async def get_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_resource_template_without_preload_content( self, @@ -3878,10 +3460,7 @@ async def get_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3913,26 +3492,22 @@ async def get_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_resource_template_serialize( self, job_id, @@ -3944,44 +3519,33 @@ def _get_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/template', + method="GET", + resource_path="/api/jobs/{job_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3991,12 +3555,9 @@ def _get_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_secret_attachment( self, @@ -4005,10 +3566,7 @@ async def get_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4042,7 +3600,7 @@ async def get_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( job_id=job_id, @@ -4050,23 +3608,19 @@ async def get_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_secret_attachment_with_http_info( self, @@ -4075,10 +3629,7 @@ async def get_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4112,7 +3663,7 @@ async def get_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( job_id=job_id, @@ -4120,23 +3671,19 @@ async def get_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_secret_attachment_without_preload_content( self, @@ -4145,10 +3692,7 @@ async def get_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4182,7 +3726,7 @@ async def get_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( job_id=job_id, @@ -4190,19 +3734,15 @@ async def get_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_secret_attachment_serialize( self, job_id, @@ -4215,46 +3755,35 @@ def _get_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/secrets/{secret_attachment_id}', + method="GET", + resource_path="/api/jobs/{job_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4264,22 +3793,16 @@ def _get_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4309,39 +3832,32 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobServerInfo", + "200": "JobServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4371,39 +3887,32 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobServerInfo", + "200": "JobServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4433,25 +3942,21 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobServerInfo", + "200": "JobServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_options_serialize( self, _request_auth, @@ -4462,16 +3967,13 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4480,24 +3982,16 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/info', + method="GET", + resource_path="/api/jobs/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4507,12 +4001,9 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_service_account_attachment( self, @@ -4520,10 +4011,7 @@ async def get_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4555,30 +4043,26 @@ async def get_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_service_account_attachment_with_http_info( self, @@ -4586,10 +4070,7 @@ async def get_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4621,30 +4102,26 @@ async def get_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_service_account_attachment_without_preload_content( self, @@ -4652,10 +4129,7 @@ async def get_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4687,26 +4161,22 @@ async def get_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_service_account_attachment_serialize( self, job_id, @@ -4718,44 +4188,33 @@ def _get_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/service_account', + method="GET", + resource_path="/api/jobs/{job_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4765,12 +4224,9 @@ def _get_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_token_info( self, @@ -4778,10 +4234,7 @@ async def get_token_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4813,30 +4266,26 @@ async def get_token_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_token_info_with_http_info( self, @@ -4844,10 +4293,7 @@ async def get_token_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4879,30 +4325,26 @@ async def get_token_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_token_info_without_preload_content( self, @@ -4910,10 +4352,7 @@ async def get_token_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4945,26 +4384,22 @@ async def get_token_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_token_info_serialize( self, job_id, @@ -4976,44 +4411,33 @@ def _get_token_info_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/token', + method="GET", + resource_path="/api/jobs/{job_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5023,34 +4447,53 @@ def _get_token_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on job name.")] = None, - tags: Annotated[Optional[StrictStr], Field(description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on job name.") + ] = None, + tags: Annotated[ + Optional[StrictStr], + Field( + description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5105,7 +4548,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -5123,45 +4566,63 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobList", + "200": "JobList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on job name.")] = None, - tags: Annotated[Optional[StrictStr], Field(description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on job name.") + ] = None, + tags: Annotated[ + Optional[StrictStr], + Field( + description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5216,7 +4677,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -5234,45 +4695,63 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobList", + "200": "JobList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on job name.")] = None, - tags: Annotated[Optional[StrictStr], Field(description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on job name.") + ] = None, + tags: Annotated[ + Optional[StrictStr], + Field( + description="Filter to jobs whose tags contain the given 'key:value' pair, e.g. 'saturn.io/kind:finetune'." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5327,7 +4806,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -5345,19 +4824,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobList", + "200": "JobList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -5380,90 +4855,79 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if tags is not None: - - _query_params.append(('tags', tags)) - + + _query_params.append(("tags", tags)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs', + method="GET", + resource_path="/api/jobs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5473,26 +4937,23 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_runtime_summaries( self, job_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5531,7 +4992,7 @@ async def list_runtime_summaries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_runtime_summaries_serialize( job_id=job_id, @@ -5541,37 +5002,33 @@ async def list_runtime_summaries( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRuntimeSummaryList", + "200": "JobRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_runtime_summaries_with_http_info( self, job_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5610,7 +5067,7 @@ async def list_runtime_summaries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_runtime_summaries_serialize( job_id=job_id, @@ -5620,37 +5077,33 @@ async def list_runtime_summaries_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRuntimeSummaryList", + "200": "JobRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_runtime_summaries_without_preload_content( self, job_id: StrictStr, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5689,7 +5142,7 @@ async def list_runtime_summaries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_runtime_summaries_serialize( job_id=job_id, @@ -5699,19 +5152,15 @@ async def list_runtime_summaries_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobRuntimeSummaryList", + "200": "JobRuntimeSummaryList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_runtime_summaries_serialize( self, job_id, @@ -5726,56 +5175,45 @@ def _list_runtime_summaries_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/runtimesummary', + method="GET", + resource_path="/api/jobs/{job_id}/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5785,29 +5223,33 @@ def _list_runtime_summaries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_secret_attachments( self, job_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5851,7 +5293,7 @@ async def list_secret_attachments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( job_id=job_id, @@ -5864,40 +5306,43 @@ async def list_secret_attachments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_secret_attachments_with_http_info( self, job_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5941,7 +5386,7 @@ async def list_secret_attachments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( job_id=job_id, @@ -5954,40 +5399,43 @@ async def list_secret_attachments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_secret_attachments_without_preload_content( self, job_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6031,7 +5479,7 @@ async def list_secret_attachments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( job_id=job_id, @@ -6044,19 +5492,15 @@ async def list_secret_attachments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_secret_attachments_serialize( self, job_id, @@ -6074,68 +5518,57 @@ def _list_secret_attachments_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters if location is not None: - - _query_params.append(('location', location)) - + + _query_params.append(("location", location)) + if attachment_type is not None: - - _query_params.append(('attachment_type', attachment_type.value)) - + + _query_params.append(("attachment_type", attachment_type.value)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/jobs/{job_id}/secrets', + method="GET", + resource_path="/api/jobs/{job_id}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6145,12 +5578,9 @@ def _list_secret_attachments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def restart( self, @@ -6159,10 +5589,7 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6197,7 +5624,7 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( job_id=job_id, @@ -6205,23 +5632,19 @@ async def restart( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def restart_with_http_info( self, @@ -6230,10 +5653,7 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6268,7 +5688,7 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( job_id=job_id, @@ -6276,23 +5696,19 @@ async def restart_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def restart_without_preload_content( self, @@ -6301,10 +5717,7 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6339,7 +5752,7 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( job_id=job_id, @@ -6347,19 +5760,15 @@ async def restart_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _restart_serialize( self, job_id, @@ -6372,21 +5781,18 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -6394,37 +5800,24 @@ def _restart_serialize( if job_restart is not None: _body_params = job_restart - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/restart', + method="POST", + resource_path="/api/jobs/{job_id}/restart", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6434,12 +5827,9 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def rotate_token( self, @@ -6447,10 +5837,7 @@ async def rotate_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6483,30 +5870,26 @@ async def rotate_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def rotate_token_with_http_info( self, @@ -6514,10 +5897,7 @@ async def rotate_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6550,30 +5930,26 @@ async def rotate_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def rotate_token_without_preload_content( self, @@ -6581,10 +5957,7 @@ async def rotate_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6617,26 +5990,22 @@ async def rotate_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _rotate_token_serialize( self, job_id, @@ -6648,44 +6017,33 @@ def _rotate_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/token', + method="POST", + resource_path="/api/jobs/{job_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6695,12 +6053,9 @@ def _rotate_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def schedule( self, @@ -6709,10 +6064,7 @@ async def schedule( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6746,7 +6098,7 @@ async def schedule( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._schedule_serialize( job_id=job_id, @@ -6754,23 +6106,19 @@ async def schedule( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def schedule_with_http_info( self, @@ -6779,10 +6127,7 @@ async def schedule_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6816,7 +6161,7 @@ async def schedule_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._schedule_serialize( job_id=job_id, @@ -6824,23 +6169,19 @@ async def schedule_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def schedule_without_preload_content( self, @@ -6849,10 +6190,7 @@ async def schedule_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6886,7 +6224,7 @@ async def schedule_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._schedule_serialize( job_id=job_id, @@ -6894,19 +6232,15 @@ async def schedule_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _schedule_serialize( self, job_id, @@ -6919,21 +6253,18 @@ def _schedule_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -6941,37 +6272,24 @@ def _schedule_serialize( if cron_schedule_update is not None: _body_params = cron_schedule_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/schedule', + method="POST", + resource_path="/api/jobs/{job_id}/schedule", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6981,12 +6299,9 @@ def _schedule_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def start( self, @@ -6995,10 +6310,7 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7033,7 +6345,7 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( job_id=job_id, @@ -7041,23 +6353,19 @@ async def start( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def start_with_http_info( self, @@ -7066,10 +6374,7 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7104,7 +6409,7 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( job_id=job_id, @@ -7112,23 +6417,19 @@ async def start_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def start_without_preload_content( self, @@ -7137,10 +6438,7 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7175,7 +6473,7 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( job_id=job_id, @@ -7183,19 +6481,15 @@ async def start_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _start_serialize( self, job_id, @@ -7208,21 +6502,18 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -7230,37 +6521,24 @@ def _start_serialize( if job_start is not None: _body_params = job_start - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/start', + method="POST", + resource_path="/api/jobs/{job_id}/start", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7270,12 +6548,9 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def stop( self, @@ -7283,10 +6558,7 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7319,30 +6591,26 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def stop_with_http_info( self, @@ -7350,10 +6618,7 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7386,30 +6651,26 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def stop_without_preload_content( self, @@ -7417,10 +6678,7 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7453,26 +6711,22 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_serialize( self, job_id, @@ -7484,44 +6738,33 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/stop', + method="POST", + resource_path="/api/jobs/{job_id}/stop", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7531,12 +6774,9 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def stop_run( self, @@ -7545,10 +6785,7 @@ async def stop_run( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7583,7 +6820,7 @@ async def stop_run( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_run_serialize( job_id=job_id, @@ -7591,23 +6828,19 @@ async def stop_run( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def stop_run_with_http_info( self, @@ -7616,10 +6849,7 @@ async def stop_run_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7654,7 +6884,7 @@ async def stop_run_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_run_serialize( job_id=job_id, @@ -7662,23 +6892,19 @@ async def stop_run_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def stop_run_without_preload_content( self, @@ -7687,10 +6913,7 @@ async def stop_run_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7725,7 +6948,7 @@ async def stop_run_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_run_serialize( job_id=job_id, @@ -7733,19 +6956,15 @@ async def stop_run_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_run_serialize( self, job_id, @@ -7758,46 +6977,35 @@ def _stop_run_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id if run_name is not None: - _path_params['run_name'] = run_name + _path_params["run_name"] = run_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/stop/{run_name}', + method="POST", + resource_path="/api/jobs/{job_id}/stop/{run_name}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7807,12 +7015,9 @@ def _stop_run_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def unschedule( self, @@ -7820,10 +7025,7 @@ async def unschedule( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7855,30 +7057,26 @@ async def unschedule( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unschedule_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def unschedule_with_http_info( self, @@ -7886,10 +7084,7 @@ async def unschedule_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7921,30 +7116,26 @@ async def unschedule_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unschedule_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def unschedule_without_preload_content( self, @@ -7952,10 +7143,7 @@ async def unschedule_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7987,26 +7175,22 @@ async def unschedule_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unschedule_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _unschedule_serialize( self, job_id, @@ -8018,44 +7202,33 @@ def _unschedule_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/jobs/{job_id}/unschedule', + method="POST", + resource_path="/api/jobs/{job_id}/unschedule", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8065,12 +7238,9 @@ def _unschedule_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -8079,10 +7249,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8117,7 +7284,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( job_id=job_id, @@ -8125,23 +7292,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -8150,10 +7313,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8188,7 +7348,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( job_id=job_id, @@ -8196,23 +7356,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -8221,10 +7377,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8259,7 +7412,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( job_id=job_id, @@ -8267,19 +7420,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Job", + "200": "Job", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, job_id, @@ -8292,21 +7441,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -8314,37 +7460,24 @@ def _update_serialize( if job_update is not None: _body_params = job_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/jobs/{job_id}', + method="PATCH", + resource_path="/api/jobs/{job_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8354,12 +7487,9 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_resource_template( self, @@ -8367,10 +7497,7 @@ async def update_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8402,30 +7529,26 @@ async def update_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_resource_template_with_http_info( self, @@ -8433,10 +7556,7 @@ async def update_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8468,30 +7588,26 @@ async def update_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_resource_template_without_preload_content( self, @@ -8499,10 +7615,7 @@ async def update_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8534,26 +7647,22 @@ async def update_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_resource_template_serialize( self, job_id, @@ -8565,44 +7674,33 @@ def _update_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/jobs/{job_id}/template', + method="PATCH", + resource_path="/api/jobs/{job_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8612,12 +7710,9 @@ def _update_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_secret_attachment( self, @@ -8627,10 +7722,7 @@ async def update_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8666,7 +7758,7 @@ async def update_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( job_id=job_id, @@ -8675,23 +7767,19 @@ async def update_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_secret_attachment_with_http_info( self, @@ -8701,10 +7789,7 @@ async def update_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8740,7 +7825,7 @@ async def update_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( job_id=job_id, @@ -8749,23 +7834,19 @@ async def update_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_secret_attachment_without_preload_content( self, @@ -8775,10 +7856,7 @@ async def update_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8814,7 +7892,7 @@ async def update_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( job_id=job_id, @@ -8823,19 +7901,15 @@ async def update_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_secret_attachment_serialize( self, job_id, @@ -8849,23 +7923,20 @@ def _update_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -8873,37 +7944,24 @@ def _update_secret_attachment_serialize( if secret_attachment_update is not None: _body_params = secret_attachment_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/jobs/{job_id}/secrets/{secret_attachment_id}', + method="PATCH", + resource_path="/api/jobs/{job_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8913,12 +7971,9 @@ def _update_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_token( self, @@ -8927,10 +7982,7 @@ async def update_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8965,7 +8017,7 @@ async def update_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( job_id=job_id, @@ -8973,23 +8025,19 @@ async def update_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_token_with_http_info( self, @@ -8998,10 +8046,7 @@ async def update_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9036,7 +8081,7 @@ async def update_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( job_id=job_id, @@ -9044,23 +8089,19 @@ async def update_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_token_without_preload_content( self, @@ -9069,10 +8110,7 @@ async def update_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9107,7 +8145,7 @@ async def update_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( job_id=job_id, @@ -9115,19 +8153,15 @@ async def update_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_token_serialize( self, job_id, @@ -9140,21 +8174,18 @@ def _update_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters @@ -9162,37 +8193,24 @@ def _update_token_serialize( if resource_token_update is not None: _body_params = resource_token_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/jobs/{job_id}/token', + method="PATCH", + resource_path="/api/jobs/{job_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9202,7 +8220,5 @@ def _update_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/limits_api.py b/saturn_api/api/limits_api.py index 9872f79..f5e2680 100644 --- a/saturn_api/api/limits_api.py +++ b/saturn_api/api/limits_api.py @@ -1,30 +1,25 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.usage_limits_create import UsageLimitsCreate from saturn_api.models.usage_limits_list import UsageLimitsList from saturn_api.models.usage_limits_update import UsageLimitsUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,7 +35,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +42,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +75,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( usage_limits_create=usage_limits_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UsageLimits", + "201": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +102,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +135,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( usage_limits_create=usage_limits_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UsageLimits", + "201": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +162,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +195,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( usage_limits_create=usage_limits_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UsageLimits", + "201": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, usage_limits_create, @@ -249,16 +222,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +239,24 @@ def _create_serialize( if usage_limits_create is not None: _body_params = usage_limits_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/limits', + method="POST", + resource_path="/api/limits", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +266,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +276,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +309,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +336,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +369,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +396,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +429,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, limits_id, @@ -523,37 +456,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if limits_id is not None: - _path_params['limits_id'] = limits_id + _path_params["limits_id"] = limits_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/limits/{limits_id}', + method="DELETE", + resource_path="/api/limits/{limits_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +488,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +498,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +531,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +558,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +591,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +618,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +651,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( limits_id=limits_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, limits_id, @@ -777,44 +678,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if limits_id is not None: - _path_params['limits_id'] = limits_id + _path_params["limits_id"] = limits_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/limits/{limits_id}', + method="GET", + resource_path="/api/limits/{limits_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,28 +714,35 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on usage limit name.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Filter usage limits by org. Defaults to the default org for the current user/group.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on usage limit name."), + ] = None, + org_id: Annotated[ + Optional[StrictStr], + Field( + description="Filter usage limits by org. Defaults to the default org for the current user/group." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -888,7 +785,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -900,39 +797,45 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimitsList", + "200": "UsageLimitsList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on usage limit name.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Filter usage limits by org. Defaults to the default org for the current user/group.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on usage limit name."), + ] = None, + org_id: Annotated[ + Optional[StrictStr], + Field( + description="Filter usage limits by org. Defaults to the default org for the current user/group." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -975,7 +878,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -987,39 +890,45 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimitsList", + "200": "UsageLimitsList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on usage limit name.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Filter usage limits by org. Defaults to the default org for the current user/group.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on usage limit name."), + ] = None, + org_id: Annotated[ + Optional[StrictStr], + Field( + description="Filter usage limits by org. Defaults to the default org for the current user/group." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1062,7 +971,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1074,19 +983,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimitsList", + "200": "UsageLimitsList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, name, @@ -1103,66 +1008,55 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/limits', + method="GET", + resource_path="/api/limits", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1172,12 +1066,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1186,10 +1077,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1224,7 +1112,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( limits_id=limits_id, @@ -1232,23 +1120,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1257,10 +1141,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1295,7 +1176,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( limits_id=limits_id, @@ -1303,23 +1184,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1328,10 +1205,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1366,7 +1240,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( limits_id=limits_id, @@ -1374,19 +1248,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, limits_id, @@ -1399,21 +1269,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if limits_id is not None: - _path_params['limits_id'] = limits_id + _path_params["limits_id"] = limits_id # process the query parameters # process the header parameters # process the form parameters @@ -1421,37 +1288,24 @@ def _update_serialize( if usage_limits_update is not None: _body_params = usage_limits_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/limits/{limits_id}', + method="PATCH", + resource_path="/api/limits/{limits_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1461,7 +1315,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/notifications_api.py b/saturn_api/api/notifications_api.py index 34c8436..2a5d845 100644 --- a/saturn_api/api/notifications_api.py +++ b/saturn_api/api/notifications_api.py @@ -1,33 +1,30 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.notification_acknowledged import NotificationAcknowledged from saturn_api.models.notification_delete import NotificationDelete from saturn_api.models.notification_list import NotificationList from saturn_api.models.notification_subscribe import NotificationSubscribe from saturn_api.models.notification_subscription import NotificationSubscription -from saturn_api.models.notification_subscription_list import NotificationSubscriptionList +from saturn_api.models.notification_subscription_list import ( + NotificationSubscriptionList, +) from saturn_api.models.notification_unsubscribe import NotificationUnsubscribe - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -43,7 +40,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def acknowledge( self, @@ -51,10 +47,7 @@ async def acknowledge( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,30 +80,26 @@ async def acknowledge( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._acknowledge_serialize( notification_acknowledged=notification_acknowledged, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def acknowledge_with_http_info( self, @@ -118,10 +107,7 @@ async def acknowledge_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,30 +140,26 @@ async def acknowledge_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._acknowledge_serialize( notification_acknowledged=notification_acknowledged, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def acknowledge_without_preload_content( self, @@ -185,10 +167,7 @@ async def acknowledge_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -221,26 +200,22 @@ async def acknowledge_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._acknowledge_serialize( notification_acknowledged=notification_acknowledged, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _acknowledge_serialize( self, notification_acknowledged, @@ -252,16 +227,13 @@ def _acknowledge_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -272,30 +244,20 @@ def _acknowledge_serialize( if notification_acknowledged is not None: _body_params = notification_acknowledged - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/notifications', + method="PUT", + resource_path="/api/notifications", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -305,12 +267,9 @@ def _acknowledge_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -318,10 +277,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -353,30 +309,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( notification_delete=notification_delete, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -384,10 +336,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -419,30 +368,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( notification_delete=notification_delete, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -450,10 +395,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -485,26 +427,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( notification_delete=notification_delete, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, notification_delete, @@ -516,16 +454,13 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -536,30 +471,20 @@ def _delete_serialize( if notification_delete is not None: _body_params = notification_delete - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/notifications', + method="DELETE", + resource_path="/api/notifications", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -569,26 +494,25 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -626,7 +550,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( prev_key=prev_key, @@ -636,37 +560,35 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationList", + "200": "NotificationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -704,7 +626,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( prev_key=prev_key, @@ -714,37 +636,35 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationList", + "200": "NotificationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -782,7 +702,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( prev_key=prev_key, @@ -792,19 +712,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationList", + "200": "NotificationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, prev_key, @@ -819,58 +735,47 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/notifications', + method="GET", + resource_path="/api/notifications", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -880,28 +785,34 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_subscriptions( self, - topic: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by topic.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by user ID. Defaults to authenticated user.")] = None, + topic: Annotated[ + Optional[StrictStr], Field(description="Filter notification subscriptions by topic.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], + Field( + description="Filter notification subscriptions by user ID. Defaults to authenticated user." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -943,7 +854,7 @@ async def list_subscriptions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_subscriptions_serialize( topic=topic, @@ -955,39 +866,44 @@ async def list_subscriptions( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationSubscriptionList", + "200": "NotificationSubscriptionList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_subscriptions_with_http_info( self, - topic: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by topic.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by user ID. Defaults to authenticated user.")] = None, + topic: Annotated[ + Optional[StrictStr], Field(description="Filter notification subscriptions by topic.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], + Field( + description="Filter notification subscriptions by user ID. Defaults to authenticated user." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1029,7 +945,7 @@ async def list_subscriptions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_subscriptions_serialize( topic=topic, @@ -1041,39 +957,44 @@ async def list_subscriptions_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationSubscriptionList", + "200": "NotificationSubscriptionList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_subscriptions_without_preload_content( self, - topic: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by topic.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Filter notification subscriptions by user ID. Defaults to authenticated user.")] = None, + topic: Annotated[ + Optional[StrictStr], Field(description="Filter notification subscriptions by topic.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], + Field( + description="Filter notification subscriptions by user ID. Defaults to authenticated user." + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1115,7 +1036,7 @@ async def list_subscriptions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_subscriptions_serialize( topic=topic, @@ -1127,19 +1048,15 @@ async def list_subscriptions_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationSubscriptionList", + "200": "NotificationSubscriptionList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_subscriptions_serialize( self, topic, @@ -1156,66 +1073,55 @@ def _list_subscriptions_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if topic is not None: - - _query_params.append(('topic', topic)) - + + _query_params.append(("topic", topic)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/notifications/subscriptions', + method="GET", + resource_path="/api/notifications/subscriptions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1225,12 +1131,9 @@ def _list_subscriptions_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def subscribe( self, @@ -1238,10 +1141,7 @@ async def subscribe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1273,30 +1173,26 @@ async def subscribe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._subscribe_serialize( notification_subscribe=notification_subscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationSubscription", + "200": "NotificationSubscription", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def subscribe_with_http_info( self, @@ -1304,10 +1200,7 @@ async def subscribe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1339,30 +1232,26 @@ async def subscribe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._subscribe_serialize( notification_subscribe=notification_subscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationSubscription", + "200": "NotificationSubscription", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def subscribe_without_preload_content( self, @@ -1370,10 +1259,7 @@ async def subscribe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1405,26 +1291,22 @@ async def subscribe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._subscribe_serialize( notification_subscribe=notification_subscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "NotificationSubscription", + "200": "NotificationSubscription", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _subscribe_serialize( self, notification_subscribe, @@ -1436,16 +1318,13 @@ def _subscribe_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1456,37 +1335,24 @@ def _subscribe_serialize( if notification_subscribe is not None: _body_params = notification_subscribe - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/notifications/subscriptions', + method="PUT", + resource_path="/api/notifications/subscriptions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1496,12 +1362,9 @@ def _subscribe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def unsubscribe( self, @@ -1509,10 +1372,7 @@ async def unsubscribe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1544,30 +1404,26 @@ async def unsubscribe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unsubscribe_serialize( notification_unsubscribe=notification_unsubscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def unsubscribe_with_http_info( self, @@ -1575,10 +1431,7 @@ async def unsubscribe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1610,30 +1463,26 @@ async def unsubscribe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unsubscribe_serialize( notification_unsubscribe=notification_unsubscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def unsubscribe_without_preload_content( self, @@ -1641,10 +1490,7 @@ async def unsubscribe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1676,26 +1522,22 @@ async def unsubscribe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unsubscribe_serialize( notification_unsubscribe=notification_unsubscribe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _unsubscribe_serialize( self, notification_unsubscribe, @@ -1707,16 +1549,13 @@ def _unsubscribe_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1727,30 +1566,20 @@ def _unsubscribe_serialize( if notification_unsubscribe is not None: _body_params = notification_unsubscribe - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/notifications/subscriptions', + method="DELETE", + resource_path="/api/notifications/subscriptions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1760,7 +1589,5 @@ def _unsubscribe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/object_storage_api.py b/saturn_api/api/object_storage_api.py index c0b22e1..c1ec99b 100644 --- a/saturn_api/api/object_storage_api.py +++ b/saturn_api/api/object_storage_api.py @@ -1,38 +1,51 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated -from saturn_api.models.object_storage_bulk_delete_results import ObjectStorageBulkDeleteResults + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse +from saturn_api.models.object_storage_bulk_delete_results import ( + ObjectStorageBulkDeleteResults, +) from saturn_api.models.object_storage_bulk_download import ObjectStorageBulkDownload from saturn_api.models.object_storage_bulk_reference import ObjectStorageBulkReference -from saturn_api.models.object_storage_completed_upload import ObjectStorageCompletedUpload +from saturn_api.models.object_storage_completed_upload import ( + ObjectStorageCompletedUpload, +) from saturn_api.models.object_storage_list import ObjectStorageList -from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload -from saturn_api.models.object_storage_presigned_upload import ObjectStoragePresignedUpload +from saturn_api.models.object_storage_presigned_download import ( + ObjectStoragePresignedDownload, +) +from saturn_api.models.object_storage_presigned_upload import ( + ObjectStoragePresignedUpload, +) from saturn_api.models.object_storage_reference import ObjectStorageReference -from saturn_api.models.object_storage_shared_owner_list import ObjectStorageSharedOwnerList +from saturn_api.models.object_storage_shared_owner_list import ( + ObjectStorageSharedOwnerList, +) from saturn_api.models.object_storage_upload_create import ObjectStorageUploadCreate from saturn_api.models.object_storage_upload_list import ObjectStorageUploadList from saturn_api.models.object_storage_usage_stats import ObjectStorageUsageStats - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -48,7 +61,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def cancel_upload( self, @@ -56,10 +68,7 @@ async def cancel_upload( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -91,30 +100,26 @@ async def cancel_upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_upload_serialize( object_storage_upload_id=object_storage_upload_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def cancel_upload_with_http_info( self, @@ -122,10 +127,7 @@ async def cancel_upload_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -157,30 +159,26 @@ async def cancel_upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_upload_serialize( object_storage_upload_id=object_storage_upload_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def cancel_upload_without_preload_content( self, @@ -188,10 +186,7 @@ async def cancel_upload_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,26 +218,22 @@ async def cancel_upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_upload_serialize( object_storage_upload_id=object_storage_upload_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _cancel_upload_serialize( self, object_storage_upload_id, @@ -254,37 +245,29 @@ def _cancel_upload_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if object_storage_upload_id is not None: - _path_params['object_storage_upload_id'] = object_storage_upload_id + _path_params["object_storage_upload_id"] = object_storage_upload_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/object_storage/upload/{object_storage_upload_id}', + method="DELETE", + resource_path="/api/object_storage/upload/{object_storage_upload_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -294,12 +277,9 @@ def _cancel_upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def complete_upload( self, @@ -308,10 +288,7 @@ async def complete_upload( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -345,7 +322,7 @@ async def complete_upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._complete_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -353,23 +330,19 @@ async def complete_upload( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def complete_upload_with_http_info( self, @@ -378,10 +351,7 @@ async def complete_upload_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -415,7 +385,7 @@ async def complete_upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._complete_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -423,23 +393,19 @@ async def complete_upload_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def complete_upload_without_preload_content( self, @@ -448,10 +414,7 @@ async def complete_upload_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -485,7 +448,7 @@ async def complete_upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._complete_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -493,19 +456,15 @@ async def complete_upload_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _complete_upload_serialize( self, object_storage_upload_id, @@ -518,21 +477,18 @@ def _complete_upload_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if object_storage_upload_id is not None: - _path_params['object_storage_upload_id'] = object_storage_upload_id + _path_params["object_storage_upload_id"] = object_storage_upload_id # process the query parameters # process the header parameters # process the form parameters @@ -540,30 +496,20 @@ def _complete_upload_serialize( if object_storage_completed_upload is not None: _body_params = object_storage_completed_upload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/object_storage/upload/{object_storage_upload_id}', + method="POST", + resource_path="/api/object_storage/upload/{object_storage_upload_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -573,12 +519,9 @@ def _complete_upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -586,10 +529,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -621,30 +561,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -652,10 +588,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -687,30 +620,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -718,10 +647,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -753,26 +679,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, object_storage_reference, @@ -784,16 +706,13 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -804,30 +723,20 @@ def _delete_serialize( if object_storage_reference is not None: _body_params = object_storage_reference - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/object_storage/delete', + method="DELETE", + resource_path="/api/object_storage/delete", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -837,12 +746,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_bulk( self, @@ -850,10 +756,7 @@ async def delete_bulk( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -885,30 +788,26 @@ async def delete_bulk( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageBulkDeleteResults", + "200": "ObjectStorageBulkDeleteResults", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_bulk_with_http_info( self, @@ -916,10 +815,7 @@ async def delete_bulk_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -951,30 +847,26 @@ async def delete_bulk_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageBulkDeleteResults", + "200": "ObjectStorageBulkDeleteResults", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_bulk_without_preload_content( self, @@ -982,10 +874,7 @@ async def delete_bulk_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1017,26 +906,22 @@ async def delete_bulk_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageBulkDeleteResults", + "200": "ObjectStorageBulkDeleteResults", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_bulk_serialize( self, object_storage_bulk_reference, @@ -1048,16 +933,13 @@ def _delete_bulk_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1068,37 +950,24 @@ def _delete_bulk_serialize( if object_storage_bulk_reference is not None: _body_params = object_storage_bulk_reference - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/object_storage/bulk_delete', + method="DELETE", + resource_path="/api/object_storage/bulk_delete", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1108,12 +977,9 @@ def _delete_bulk_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def download( self, @@ -1121,10 +987,7 @@ async def download( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1157,30 +1020,26 @@ async def download( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedDownload", + "200": "ObjectStoragePresignedDownload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def download_with_http_info( self, @@ -1188,10 +1047,7 @@ async def download_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1224,30 +1080,26 @@ async def download_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedDownload", + "200": "ObjectStoragePresignedDownload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def download_without_preload_content( self, @@ -1255,10 +1107,7 @@ async def download_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1291,26 +1140,22 @@ async def download_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_serialize( object_storage_reference=object_storage_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedDownload", + "200": "ObjectStoragePresignedDownload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _download_serialize( self, object_storage_reference, @@ -1322,16 +1167,13 @@ def _download_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1342,37 +1184,24 @@ def _download_serialize( if object_storage_reference is not None: _body_params = object_storage_reference - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/object_storage/download', + method="POST", + resource_path="/api/object_storage/download", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1382,12 +1211,9 @@ def _download_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def download_bulk( self, @@ -1395,10 +1221,7 @@ async def download_bulk( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1431,30 +1254,26 @@ async def download_bulk( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageBulkDownload", + "200": "ObjectStorageBulkDownload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def download_bulk_with_http_info( self, @@ -1462,10 +1281,7 @@ async def download_bulk_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1498,30 +1314,26 @@ async def download_bulk_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageBulkDownload", + "200": "ObjectStorageBulkDownload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def download_bulk_without_preload_content( self, @@ -1529,10 +1341,7 @@ async def download_bulk_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1565,26 +1374,22 @@ async def download_bulk_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._download_bulk_serialize( object_storage_bulk_reference=object_storage_bulk_reference, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageBulkDownload", + "200": "ObjectStorageBulkDownload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _download_bulk_serialize( self, object_storage_bulk_reference, @@ -1596,16 +1401,13 @@ def _download_bulk_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1616,37 +1418,24 @@ def _download_bulk_serialize( if object_storage_bulk_reference is not None: _body_params = object_storage_bulk_reference - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/object_storage/bulk_download', + method="POST", + resource_path="/api/object_storage/bulk_download", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1656,28 +1445,35 @@ def _download_bulk_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_usage( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1719,7 +1515,7 @@ async def get_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_serialize( owner_name=owner_name, @@ -1731,39 +1527,45 @@ async def get_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageUsageStats", + "200": "ObjectStorageUsageStats", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_usage_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1805,7 +1607,7 @@ async def get_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_serialize( owner_name=owner_name, @@ -1817,39 +1619,45 @@ async def get_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageUsageStats", + "200": "ObjectStorageUsageStats", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_usage_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1891,7 +1699,7 @@ async def get_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_serialize( owner_name=owner_name, @@ -1903,19 +1711,15 @@ async def get_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageUsageStats", + "200": "ObjectStorageUsageStats", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_usage_serialize( self, owner_name, @@ -1932,66 +1736,55 @@ def _get_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/object_storage/usage', + method="GET", + resource_path="/api/object_storage/usage", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2001,32 +1794,49 @@ def _get_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage file path.")] = None, - last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, - max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - delimited: Annotated[Optional[StrictBool], Field(description="Delimit results by directory.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + prefix: Annotated[ + Optional[StrictStr], + Field(description="Prefix matched search string on object storage file path."), + ] = None, + last_key: Annotated[ + Optional[StrictStr], Field(description="Last seen key for pagination.") + ] = None, + max_keys: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + delimited: Annotated[ + Optional[StrictBool], Field(description="Delimit results by directory.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2077,7 +1887,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -2093,43 +1903,59 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageList", + "200": "ObjectStorageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage file path.")] = None, - last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, - max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - delimited: Annotated[Optional[StrictBool], Field(description="Delimit results by directory.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + prefix: Annotated[ + Optional[StrictStr], + Field(description="Prefix matched search string on object storage file path."), + ] = None, + last_key: Annotated[ + Optional[StrictStr], Field(description="Last seen key for pagination.") + ] = None, + max_keys: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + delimited: Annotated[ + Optional[StrictBool], Field(description="Delimit results by directory.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2180,7 +2006,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -2196,43 +2022,59 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageList", + "200": "ObjectStorageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage file path.")] = None, - last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, - max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - delimited: Annotated[Optional[StrictBool], Field(description="Delimit results by directory.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + prefix: Annotated[ + Optional[StrictStr], + Field(description="Prefix matched search string on object storage file path."), + ] = None, + last_key: Annotated[ + Optional[StrictStr], Field(description="Last seen key for pagination.") + ] = None, + max_keys: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + delimited: Annotated[ + Optional[StrictBool], Field(description="Delimit results by directory.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2283,7 +2125,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -2299,19 +2141,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageList", + "200": "ObjectStorageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -2332,82 +2170,71 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if prefix is not None: - - _query_params.append(('prefix', prefix)) - + + _query_params.append(("prefix", prefix)) + if last_key is not None: - - _query_params.append(('last_key', last_key)) - + + _query_params.append(("last_key", last_key)) + if max_keys is not None: - - _query_params.append(('max_keys', max_keys)) - + + _query_params.append(("max_keys", max_keys)) + if delimited is not None: - - _query_params.append(('delimited', delimited)) - + + _query_params.append(("delimited", delimited)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/object_storage', + method="GET", + resource_path="/api/object_storage", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2417,30 +2244,42 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_shared( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, - max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + last_key: Annotated[ + Optional[StrictStr], Field(description="Last seen key for pagination.") + ] = None, + max_keys: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2487,7 +2326,7 @@ async def list_shared( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_shared_serialize( owner_name=owner_name, @@ -2501,41 +2340,52 @@ async def list_shared( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageSharedOwnerList", + "200": "ObjectStorageSharedOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_shared_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, - max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + last_key: Annotated[ + Optional[StrictStr], Field(description="Last seen key for pagination.") + ] = None, + max_keys: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2582,7 +2432,7 @@ async def list_shared_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_shared_serialize( owner_name=owner_name, @@ -2596,41 +2446,52 @@ async def list_shared_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageSharedOwnerList", + "200": "ObjectStorageSharedOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_shared_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - last_key: Annotated[Optional[StrictStr], Field(description="Last seen key for pagination.")] = None, - max_keys: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + last_key: Annotated[ + Optional[StrictStr], Field(description="Last seen key for pagination.") + ] = None, + max_keys: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2677,7 +2538,7 @@ async def list_shared_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_shared_serialize( owner_name=owner_name, @@ -2691,19 +2552,15 @@ async def list_shared_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageSharedOwnerList", + "200": "ObjectStorageSharedOwnerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_shared_serialize( self, owner_name, @@ -2722,74 +2579,63 @@ def _list_shared_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if last_key is not None: - - _query_params.append(('last_key', last_key)) - + + _query_params.append(("last_key", last_key)) + if max_keys is not None: - - _query_params.append(('max_keys', max_keys)) - + + _query_params.append(("max_keys", max_keys)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/object_storage/shared', + method="GET", + resource_path="/api/object_storage/shared", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2799,30 +2645,43 @@ def _list_shared_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_uploads( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage upload file path")] = None, - is_copy: Annotated[Optional[StrictBool], Field(description="Filter object storage uploads that are or aren't copy operations.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + prefix: Annotated[ + Optional[StrictStr], + Field(description="Prefix matched search string on object storage upload file path"), + ] = None, + is_copy: Annotated[ + Optional[StrictBool], + Field(description="Filter object storage uploads that are or aren't copy operations."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2868,7 +2727,7 @@ async def list_uploads( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_uploads_serialize( owner_name=owner_name, @@ -2882,41 +2741,53 @@ async def list_uploads( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageUploadList", + "200": "ObjectStorageUploadList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_uploads_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage upload file path")] = None, - is_copy: Annotated[Optional[StrictBool], Field(description="Filter object storage uploads that are or aren't copy operations.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + prefix: Annotated[ + Optional[StrictStr], + Field(description="Prefix matched search string on object storage upload file path"), + ] = None, + is_copy: Annotated[ + Optional[StrictBool], + Field(description="Filter object storage uploads that are or aren't copy operations."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2962,7 +2833,7 @@ async def list_uploads_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_uploads_serialize( owner_name=owner_name, @@ -2976,41 +2847,53 @@ async def list_uploads_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageUploadList", + "200": "ObjectStorageUploadList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_uploads_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - prefix: Annotated[Optional[StrictStr], Field(description="Prefix matched search string on object storage upload file path")] = None, - is_copy: Annotated[Optional[StrictBool], Field(description="Filter object storage uploads that are or aren't copy operations.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + prefix: Annotated[ + Optional[StrictStr], + Field(description="Prefix matched search string on object storage upload file path"), + ] = None, + is_copy: Annotated[ + Optional[StrictBool], + Field(description="Filter object storage uploads that are or aren't copy operations."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3056,7 +2939,7 @@ async def list_uploads_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_uploads_serialize( owner_name=owner_name, @@ -3070,19 +2953,15 @@ async def list_uploads_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStorageUploadList", + "200": "ObjectStorageUploadList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_uploads_serialize( self, owner_name, @@ -3101,74 +2980,63 @@ def _list_uploads_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if prefix is not None: - - _query_params.append(('prefix', prefix)) - + + _query_params.append(("prefix", prefix)) + if is_copy is not None: - - _query_params.append(('is_copy', is_copy)) - + + _query_params.append(("is_copy", is_copy)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/object_storage/upload', + method="GET", + resource_path="/api/object_storage/upload", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3178,26 +3046,29 @@ def _list_uploads_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def resume_upload( self, object_storage_upload_id: StrictStr, - first_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the first part to retrieve presigned upload URLs for.")] = None, - last_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the last part to retrieve presigned upload URLs for.")] = None, - last_part_size: Annotated[Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], Field(description="Final part size for uploads with unspecified total size.")] = None, + first_part: Annotated[ + Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], + Field(description="Index of the first part to retrieve presigned upload URLs for."), + ] = None, + last_part: Annotated[ + Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], + Field(description="Index of the last part to retrieve presigned upload URLs for."), + ] = None, + last_part_size: Annotated[ + Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], + Field(description="Final part size for uploads with unspecified total size."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3235,7 +3106,7 @@ async def resume_upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -3245,37 +3116,39 @@ async def resume_upload( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedUpload", + "200": "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def resume_upload_with_http_info( self, object_storage_upload_id: StrictStr, - first_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the first part to retrieve presigned upload URLs for.")] = None, - last_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the last part to retrieve presigned upload URLs for.")] = None, - last_part_size: Annotated[Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], Field(description="Final part size for uploads with unspecified total size.")] = None, + first_part: Annotated[ + Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], + Field(description="Index of the first part to retrieve presigned upload URLs for."), + ] = None, + last_part: Annotated[ + Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], + Field(description="Index of the last part to retrieve presigned upload URLs for."), + ] = None, + last_part_size: Annotated[ + Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], + Field(description="Final part size for uploads with unspecified total size."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3313,7 +3186,7 @@ async def resume_upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -3323,37 +3196,39 @@ async def resume_upload_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedUpload", + "200": "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def resume_upload_without_preload_content( self, object_storage_upload_id: StrictStr, - first_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the first part to retrieve presigned upload URLs for.")] = None, - last_part: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Index of the last part to retrieve presigned upload URLs for.")] = None, - last_part_size: Annotated[Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], Field(description="Final part size for uploads with unspecified total size.")] = None, + first_part: Annotated[ + Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], + Field(description="Index of the first part to retrieve presigned upload URLs for."), + ] = None, + last_part: Annotated[ + Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], + Field(description="Index of the last part to retrieve presigned upload URLs for."), + ] = None, + last_part_size: Annotated[ + Optional[Annotated[int, Field(le=5368709120, strict=True, ge=0)]], + Field(description="Final part size for uploads with unspecified total size."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3391,7 +3266,7 @@ async def resume_upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_upload_serialize( object_storage_upload_id=object_storage_upload_id, @@ -3401,19 +3276,15 @@ async def resume_upload_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedUpload", + "200": "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _resume_upload_serialize( self, object_storage_upload_id, @@ -3428,56 +3299,45 @@ def _resume_upload_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if object_storage_upload_id is not None: - _path_params['object_storage_upload_id'] = object_storage_upload_id + _path_params["object_storage_upload_id"] = object_storage_upload_id # process the query parameters if first_part is not None: - - _query_params.append(('first_part', first_part)) - + + _query_params.append(("first_part", first_part)) + if last_part is not None: - - _query_params.append(('last_part', last_part)) - + + _query_params.append(("last_part", last_part)) + if last_part_size is not None: - - _query_params.append(('last_part_size', last_part_size)) - + + _query_params.append(("last_part_size", last_part_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/object_storage/upload/{object_storage_upload_id}', + method="GET", + resource_path="/api/object_storage/upload/{object_storage_upload_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3487,12 +3347,9 @@ def _resume_upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def upload( self, @@ -3500,10 +3357,7 @@ async def upload( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3535,30 +3389,26 @@ async def upload( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upload_serialize( object_storage_upload_create=object_storage_upload_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedUpload", + "200": "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def upload_with_http_info( self, @@ -3566,10 +3416,7 @@ async def upload_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3601,30 +3448,26 @@ async def upload_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upload_serialize( object_storage_upload_create=object_storage_upload_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedUpload", + "200": "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def upload_without_preload_content( self, @@ -3632,10 +3475,7 @@ async def upload_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3667,26 +3507,22 @@ async def upload_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upload_serialize( object_storage_upload_create=object_storage_upload_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectStoragePresignedUpload", + "200": "ObjectStoragePresignedUpload", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _upload_serialize( self, object_storage_upload_create, @@ -3698,16 +3534,13 @@ def _upload_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3718,37 +3551,24 @@ def _upload_serialize( if object_storage_upload_create is not None: _body_params = object_storage_upload_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/object_storage/upload', + method="POST", + resource_path="/api/object_storage/upload", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3758,7 +3578,5 @@ def _upload_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/orgs_api.py b/saturn_api/api/orgs_api.py index 0b9a624..088697b 100644 --- a/saturn_api/api/orgs_api.py +++ b/saturn_api/api/orgs_api.py @@ -1,24 +1,22 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.aggregated_usage import AggregatedUsage from saturn_api.models.daily_usage_list import DailyUsageList from saturn_api.models.identity_type import IdentityType @@ -38,9 +36,6 @@ from saturn_api.models.owner_usage_list import OwnerUsageList from saturn_api.models.owner_user_detailed import OwnerUserDetailed from saturn_api.models.usage_limits import UsageLimits - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -56,7 +51,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def accept_invitation( self, @@ -64,10 +58,7 @@ async def accept_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -99,30 +90,26 @@ async def accept_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerDetailed", + "200": "OwnerDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def accept_invitation_with_http_info( self, @@ -130,10 +117,7 @@ async def accept_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -165,30 +149,26 @@ async def accept_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerDetailed", + "200": "OwnerDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def accept_invitation_without_preload_content( self, @@ -196,10 +176,7 @@ async def accept_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -231,26 +208,22 @@ async def accept_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerDetailed", + "200": "OwnerDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _accept_invitation_serialize( self, token, @@ -262,44 +235,33 @@ def _accept_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if token is not None: - _path_params['token'] = token + _path_params["token"] = token # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/orgs/invitation/{token}/accept', + method="POST", + resource_path="/api/orgs/invitation/{token}/accept", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +271,9 @@ def _accept_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create( self, @@ -322,10 +281,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +314,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( org_create=org_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Org", + "201": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -389,10 +341,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +374,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( org_create=org_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Org", + "201": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -456,10 +401,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +434,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( org_create=org_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Org", + "201": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, org_create, @@ -523,16 +461,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -543,37 +478,24 @@ def _create_serialize( if org_create is not None: _body_params = org_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/orgs', + method="POST", + resource_path="/api/orgs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -583,12 +505,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_invitation( self, @@ -597,10 +516,7 @@ async def create_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -634,7 +550,7 @@ async def create_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitation_serialize( org_id=org_id, @@ -642,23 +558,19 @@ async def create_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OrgInvitation", + "201": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_invitation_with_http_info( self, @@ -667,10 +579,7 @@ async def create_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -704,7 +613,7 @@ async def create_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitation_serialize( org_id=org_id, @@ -712,23 +621,19 @@ async def create_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OrgInvitation", + "201": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_invitation_without_preload_content( self, @@ -737,10 +642,7 @@ async def create_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -774,7 +676,7 @@ async def create_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitation_serialize( org_id=org_id, @@ -782,19 +684,15 @@ async def create_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OrgInvitation", + "201": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_invitation_serialize( self, org_id, @@ -807,21 +705,18 @@ def _create_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters # process the header parameters # process the form parameters @@ -829,37 +724,24 @@ def _create_invitation_serialize( if org_invitation_create is not None: _body_params = org_invitation_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/orgs/{org_id}/invitations', + method="POST", + resource_path="/api/orgs/{org_id}/invitations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -869,12 +751,9 @@ def _create_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_member( self, @@ -883,10 +762,7 @@ async def create_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -921,7 +797,7 @@ async def create_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( org_id=org_id, @@ -929,23 +805,19 @@ async def create_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OwnerUserDetailed", + "201": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_member_with_http_info( self, @@ -954,10 +826,7 @@ async def create_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -992,7 +861,7 @@ async def create_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( org_id=org_id, @@ -1000,23 +869,19 @@ async def create_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OwnerUserDetailed", + "201": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_member_without_preload_content( self, @@ -1025,10 +890,7 @@ async def create_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1063,7 +925,7 @@ async def create_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_member_serialize( org_id=org_id, @@ -1071,19 +933,15 @@ async def create_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OwnerUserDetailed", + "201": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_member_serialize( self, org_id, @@ -1096,21 +954,18 @@ def _create_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters # process the header parameters # process the form parameters @@ -1118,37 +973,24 @@ def _create_member_serialize( if org_member_create is not None: _body_params = org_member_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/orgs/{org_id}/members', + method="POST", + resource_path="/api/orgs/{org_id}/members", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1158,12 +1000,9 @@ def _create_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def decline_invitation( self, @@ -1171,10 +1010,7 @@ async def decline_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1206,30 +1042,26 @@ async def decline_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def decline_invitation_with_http_info( self, @@ -1237,10 +1069,7 @@ async def decline_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1272,30 +1101,26 @@ async def decline_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def decline_invitation_without_preload_content( self, @@ -1303,10 +1128,7 @@ async def decline_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1338,26 +1160,22 @@ async def decline_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_invitation_serialize( token=token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _decline_invitation_serialize( self, token, @@ -1369,37 +1187,29 @@ def _decline_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if token is not None: - _path_params['token'] = token + _path_params["token"] = token # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/orgs/invitation/{token}/decline', + method="DELETE", + resource_path="/api/orgs/invitation/{token}/decline", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1409,12 +1219,9 @@ def _decline_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -1422,10 +1229,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1458,30 +1262,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -1489,10 +1289,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1525,30 +1322,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -1556,10 +1349,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1592,26 +1382,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, org_id, @@ -1623,37 +1409,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/orgs/{org_id}', + method="DELETE", + resource_path="/api/orgs/{org_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1663,12 +1441,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_invitation( self, @@ -1677,10 +1452,7 @@ async def delete_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1714,7 +1486,7 @@ async def delete_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_invitation_serialize( org_id=org_id, @@ -1722,23 +1494,19 @@ async def delete_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_invitation_with_http_info( self, @@ -1747,10 +1515,7 @@ async def delete_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1784,7 +1549,7 @@ async def delete_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_invitation_serialize( org_id=org_id, @@ -1792,23 +1557,19 @@ async def delete_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_invitation_without_preload_content( self, @@ -1817,10 +1578,7 @@ async def delete_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1854,7 +1612,7 @@ async def delete_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_invitation_serialize( org_id=org_id, @@ -1862,19 +1620,15 @@ async def delete_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_invitation_serialize( self, org_id, @@ -1887,39 +1641,31 @@ def _delete_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if invitation_id is not None: - _path_params['invitation_id'] = invitation_id + _path_params["invitation_id"] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/orgs/{org_id}/invitations/{invitation_id}', + method="DELETE", + resource_path="/api/orgs/{org_id}/invitations/{invitation_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1929,12 +1675,9 @@ def _delete_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_member( self, @@ -1943,10 +1686,7 @@ async def delete_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1980,7 +1720,7 @@ async def delete_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( org_id=org_id, @@ -1988,23 +1728,19 @@ async def delete_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_member_with_http_info( self, @@ -2013,10 +1749,7 @@ async def delete_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2050,7 +1783,7 @@ async def delete_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( org_id=org_id, @@ -2058,23 +1791,19 @@ async def delete_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_member_without_preload_content( self, @@ -2083,10 +1812,7 @@ async def delete_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2120,7 +1846,7 @@ async def delete_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_member_serialize( org_id=org_id, @@ -2128,19 +1854,15 @@ async def delete_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_member_serialize( self, org_id, @@ -2153,39 +1875,31 @@ def _delete_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/orgs/{org_id}/members/{user_id}', + method="DELETE", + resource_path="/api/orgs/{org_id}/members/{user_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2195,12 +1909,9 @@ def _delete_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -2208,10 +1919,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2244,30 +1952,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Org", + "200": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -2275,10 +1979,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2311,30 +2012,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Org", + "200": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -2342,10 +2039,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2378,26 +2072,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Org", + "200": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, org_id, @@ -2409,44 +2099,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}', + method="GET", + resource_path="/api/orgs/{org_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2456,12 +2135,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_aggregated_usage( self, @@ -2471,10 +2147,7 @@ async def get_aggregated_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2511,7 +2184,7 @@ async def get_aggregated_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( org_id=org_id, @@ -2520,23 +2193,19 @@ async def get_aggregated_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AggregatedUsage", + "200": "AggregatedUsage", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_aggregated_usage_with_http_info( self, @@ -2546,10 +2215,7 @@ async def get_aggregated_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2586,7 +2252,7 @@ async def get_aggregated_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( org_id=org_id, @@ -2595,23 +2261,19 @@ async def get_aggregated_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AggregatedUsage", + "200": "AggregatedUsage", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_aggregated_usage_without_preload_content( self, @@ -2621,10 +2283,7 @@ async def get_aggregated_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2661,7 +2320,7 @@ async def get_aggregated_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_aggregated_usage_serialize( org_id=org_id, @@ -2670,19 +2329,15 @@ async def get_aggregated_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AggregatedUsage", + "200": "AggregatedUsage", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_aggregated_usage_serialize( self, org_id, @@ -2696,70 +2351,49 @@ def _get_aggregated_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/usage/aggregated', + method="GET", + resource_path="/api/orgs/{org_id}/usage/aggregated", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2769,12 +2403,9 @@ def _get_aggregated_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_daily_usage( self, @@ -2784,10 +2415,7 @@ async def get_daily_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2824,7 +2452,7 @@ async def get_daily_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( org_id=org_id, @@ -2833,23 +2461,19 @@ async def get_daily_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_daily_usage_with_http_info( self, @@ -2859,10 +2483,7 @@ async def get_daily_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2899,7 +2520,7 @@ async def get_daily_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( org_id=org_id, @@ -2908,23 +2529,19 @@ async def get_daily_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_daily_usage_without_preload_content( self, @@ -2934,10 +2551,7 @@ async def get_daily_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2974,7 +2588,7 @@ async def get_daily_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_usage_serialize( org_id=org_id, @@ -2983,19 +2597,15 @@ async def get_daily_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_daily_usage_serialize( self, org_id, @@ -3009,70 +2619,49 @@ def _get_daily_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/usage/daily', + method="GET", + resource_path="/api/orgs/{org_id}/usage/daily", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3082,12 +2671,9 @@ def _get_daily_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_daily_user_usage( self, @@ -3098,10 +2684,7 @@ async def get_daily_user_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3140,7 +2723,7 @@ async def get_daily_user_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_user_usage_serialize( org_id=org_id, @@ -3150,23 +2733,19 @@ async def get_daily_user_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_daily_user_usage_with_http_info( self, @@ -3177,10 +2756,7 @@ async def get_daily_user_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3219,7 +2795,7 @@ async def get_daily_user_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_user_usage_serialize( org_id=org_id, @@ -3229,23 +2805,19 @@ async def get_daily_user_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_daily_user_usage_without_preload_content( self, @@ -3256,10 +2828,7 @@ async def get_daily_user_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3298,7 +2867,7 @@ async def get_daily_user_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_daily_user_usage_serialize( org_id=org_id, @@ -3308,19 +2877,15 @@ async def get_daily_user_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DailyUsageList", + "200": "DailyUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_daily_user_usage_serialize( self, org_id, @@ -3335,72 +2900,51 @@ def _get_daily_user_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/members/{user_id}/usage/daily', + method="GET", + resource_path="/api/orgs/{org_id}/members/{user_id}/usage/daily", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3410,12 +2954,9 @@ def _get_daily_user_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_invitation( self, @@ -3424,10 +2965,7 @@ async def get_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3461,7 +2999,7 @@ async def get_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( org_id=org_id, @@ -3469,23 +3007,19 @@ async def get_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitation", + "200": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_invitation_with_http_info( self, @@ -3494,10 +3028,7 @@ async def get_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3531,7 +3062,7 @@ async def get_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( org_id=org_id, @@ -3539,23 +3070,19 @@ async def get_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitation", + "200": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_invitation_without_preload_content( self, @@ -3564,10 +3091,7 @@ async def get_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3601,7 +3125,7 @@ async def get_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( org_id=org_id, @@ -3609,19 +3133,15 @@ async def get_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitation", + "200": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_invitation_serialize( self, org_id, @@ -3634,46 +3154,35 @@ def _get_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if invitation_id is not None: - _path_params['invitation_id'] = invitation_id + _path_params["invitation_id"] = invitation_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/invitations/{invitation_id}', + method="GET", + resource_path="/api/orgs/{org_id}/invitations/{invitation_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3683,12 +3192,9 @@ def _get_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_member( self, @@ -3697,10 +3203,7 @@ async def get_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3734,7 +3237,7 @@ async def get_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_member_serialize( org_id=org_id, @@ -3742,23 +3245,19 @@ async def get_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUserDetailed", + "200": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_member_with_http_info( self, @@ -3767,10 +3266,7 @@ async def get_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3804,7 +3300,7 @@ async def get_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_member_serialize( org_id=org_id, @@ -3812,23 +3308,19 @@ async def get_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUserDetailed", + "200": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_member_without_preload_content( self, @@ -3837,10 +3329,7 @@ async def get_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3874,7 +3363,7 @@ async def get_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_member_serialize( org_id=org_id, @@ -3882,19 +3371,15 @@ async def get_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUserDetailed", + "200": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_member_serialize( self, org_id, @@ -3907,46 +3392,35 @@ def _get_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/members/{user_id}', + method="GET", + resource_path="/api/orgs/{org_id}/members/{user_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3956,12 +3430,9 @@ def _get_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_owner_usage( self, @@ -3971,10 +3442,7 @@ async def get_owner_usage( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4011,7 +3479,7 @@ async def get_owner_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_owner_usage_serialize( org_id=org_id, @@ -4020,23 +3488,19 @@ async def get_owner_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUsageList", + "200": "OwnerUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_owner_usage_with_http_info( self, @@ -4046,10 +3510,7 @@ async def get_owner_usage_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4086,7 +3547,7 @@ async def get_owner_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_owner_usage_serialize( org_id=org_id, @@ -4095,23 +3556,19 @@ async def get_owner_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUsageList", + "200": "OwnerUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_owner_usage_without_preload_content( self, @@ -4121,10 +3578,7 @@ async def get_owner_usage_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4161,7 +3615,7 @@ async def get_owner_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_owner_usage_serialize( org_id=org_id, @@ -4170,19 +3624,15 @@ async def get_owner_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUsageList", + "200": "OwnerUsageList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_owner_usage_serialize( self, org_id, @@ -4196,70 +3646,49 @@ def _get_owner_usage_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/usage/owners', + method="GET", + resource_path="/api/orgs/{org_id}/usage/owners", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4269,12 +3698,9 @@ def _get_owner_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_usage_limits( self, @@ -4282,10 +3708,7 @@ async def get_usage_limits( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4317,30 +3740,26 @@ async def get_usage_limits( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_limits_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_usage_limits_with_http_info( self, @@ -4348,10 +3767,7 @@ async def get_usage_limits_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4383,30 +3799,26 @@ async def get_usage_limits_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_limits_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_usage_limits_without_preload_content( self, @@ -4414,10 +3826,7 @@ async def get_usage_limits_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4449,26 +3858,22 @@ async def get_usage_limits_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_usage_limits_serialize( org_id=org_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsageLimits", + "200": "UsageLimits", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_usage_limits_serialize( self, org_id, @@ -4480,44 +3885,33 @@ def _get_usage_limits_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/limits', + method="GET", + resource_path="/api/orgs/{org_id}/limits", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4527,28 +3921,34 @@ def _get_usage_limits_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on org name.")] = None, - all_orgs: Annotated[Optional[StrictBool], Field(description="List all orgs, instead of only orgs the user is a member of. (Admin only)")] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on org name.") + ] = None, + all_orgs: Annotated[ + Optional[StrictBool], + Field( + description="List all orgs, instead of only orgs the user is a member of. (Admin only)" + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4591,7 +3991,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -4603,39 +4003,44 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgList", + "200": "OrgList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on org name.")] = None, - all_orgs: Annotated[Optional[StrictBool], Field(description="List all orgs, instead of only orgs the user is a member of. (Admin only)")] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on org name.") + ] = None, + all_orgs: Annotated[ + Optional[StrictBool], + Field( + description="List all orgs, instead of only orgs the user is a member of. (Admin only)" + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4678,7 +4083,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -4690,39 +4095,44 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgList", + "200": "OrgList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on org name.")] = None, - all_orgs: Annotated[Optional[StrictBool], Field(description="List all orgs, instead of only orgs the user is a member of. (Admin only)")] = None, + name: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on org name.") + ] = None, + all_orgs: Annotated[ + Optional[StrictBool], + Field( + description="List all orgs, instead of only orgs the user is a member of. (Admin only)" + ), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4765,7 +4175,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -4777,19 +4187,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgList", + "200": "OrgList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, name, @@ -4806,66 +4212,55 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if all_orgs is not None: - - _query_params.append(('all_orgs', all_orgs)) - + + _query_params.append(("all_orgs", all_orgs)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs', + method="GET", + resource_path="/api/orgs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4875,30 +4270,35 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_invitations( self, org_id: StrictStr, - status: Annotated[Optional[InvitationStatus], Field(description="Filter org invitations by status.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, - invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, + status: Annotated[ + Optional[InvitationStatus], Field(description="Filter org invitations by status.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on email.") + ] = None, + invitor_id: Annotated[ + Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4944,7 +4344,7 @@ async def list_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_invitations_serialize( org_id=org_id, @@ -4958,41 +4358,45 @@ async def list_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitationList", + "200": "OrgInvitationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_invitations_with_http_info( self, org_id: StrictStr, - status: Annotated[Optional[InvitationStatus], Field(description="Filter org invitations by status.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, - invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, + status: Annotated[ + Optional[InvitationStatus], Field(description="Filter org invitations by status.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on email.") + ] = None, + invitor_id: Annotated[ + Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5038,7 +4442,7 @@ async def list_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_invitations_serialize( org_id=org_id, @@ -5052,41 +4456,45 @@ async def list_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitationList", + "200": "OrgInvitationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_invitations_without_preload_content( self, org_id: StrictStr, - status: Annotated[Optional[InvitationStatus], Field(description="Filter org invitations by status.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on email.")] = None, - invitor_id: Annotated[Optional[StrictStr], Field(description="Filter invitations by invitor user ID.")] = None, + status: Annotated[ + Optional[InvitationStatus], Field(description="Filter org invitations by status.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on email.") + ] = None, + invitor_id: Annotated[ + Optional[StrictStr], Field(description="Filter invitations by invitor user ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5132,7 +4540,7 @@ async def list_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_invitations_serialize( org_id=org_id, @@ -5146,19 +4554,15 @@ async def list_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitationList", + "200": "OrgInvitationList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_invitations_serialize( self, org_id, @@ -5177,72 +4581,61 @@ def _list_invitations_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters if status is not None: - - _query_params.append(('status', status.value)) - + + _query_params.append(("status", status.value)) + if email is not None: - - _query_params.append(('email', email)) - + + _query_params.append(("email", email)) + if invitor_id is not None: - - _query_params.append(('invitor_id', invitor_id)) - + + _query_params.append(("invitor_id", invitor_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/invitations', + method="GET", + resource_path="/api/orgs/{org_id}/invitations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5252,32 +4645,46 @@ def _list_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_owners( self, org_id: StrictStr, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string by owner identity name.")] = None, - identity_type: Annotated[Optional[IdentityType], Field(description="Filter owners by identity type.")] = None, - all_users: Annotated[Optional[StrictBool], Field(description="List all user owners, instead of just the authenticated user.")] = None, - all_groups: Annotated[Optional[StrictBool], Field(description="List all group owners, instead of just groups the authenticated user is a member of.")] = None, - details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed owner response.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string by owner identity name."), + ] = None, + identity_type: Annotated[ + Optional[IdentityType], Field(description="Filter owners by identity type.") + ] = None, + all_users: Annotated[ + Optional[StrictBool], + Field(description="List all user owners, instead of just the authenticated user."), + ] = None, + all_groups: Annotated[ + Optional[StrictBool], + Field( + description="List all group owners, instead of just groups the authenticated user is a member of." + ), + ] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrieve detailed owner response.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5328,7 +4735,7 @@ async def list_owners( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( org_id=org_id, @@ -5344,43 +4751,56 @@ async def list_owners( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgsListOwners200Response", + "200": "OrgsListOwners200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_owners_with_http_info( self, org_id: StrictStr, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string by owner identity name.")] = None, - identity_type: Annotated[Optional[IdentityType], Field(description="Filter owners by identity type.")] = None, - all_users: Annotated[Optional[StrictBool], Field(description="List all user owners, instead of just the authenticated user.")] = None, - all_groups: Annotated[Optional[StrictBool], Field(description="List all group owners, instead of just groups the authenticated user is a member of.")] = None, - details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed owner response.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string by owner identity name."), + ] = None, + identity_type: Annotated[ + Optional[IdentityType], Field(description="Filter owners by identity type.") + ] = None, + all_users: Annotated[ + Optional[StrictBool], + Field(description="List all user owners, instead of just the authenticated user."), + ] = None, + all_groups: Annotated[ + Optional[StrictBool], + Field( + description="List all group owners, instead of just groups the authenticated user is a member of." + ), + ] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrieve detailed owner response.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5431,7 +4851,7 @@ async def list_owners_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( org_id=org_id, @@ -5447,43 +4867,56 @@ async def list_owners_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgsListOwners200Response", + "200": "OrgsListOwners200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_owners_without_preload_content( self, org_id: StrictStr, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string by owner identity name.")] = None, - identity_type: Annotated[Optional[IdentityType], Field(description="Filter owners by identity type.")] = None, - all_users: Annotated[Optional[StrictBool], Field(description="List all user owners, instead of just the authenticated user.")] = None, - all_groups: Annotated[Optional[StrictBool], Field(description="List all group owners, instead of just groups the authenticated user is a member of.")] = None, - details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed owner response.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string by owner identity name."), + ] = None, + identity_type: Annotated[ + Optional[IdentityType], Field(description="Filter owners by identity type.") + ] = None, + all_users: Annotated[ + Optional[StrictBool], + Field(description="List all user owners, instead of just the authenticated user."), + ] = None, + all_groups: Annotated[ + Optional[StrictBool], + Field( + description="List all group owners, instead of just groups the authenticated user is a member of." + ), + ] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrieve detailed owner response.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5534,7 +4967,7 @@ async def list_owners_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_owners_serialize( org_id=org_id, @@ -5550,19 +4983,15 @@ async def list_owners_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgsListOwners200Response", + "200": "OrgsListOwners200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_owners_serialize( self, org_id, @@ -5583,80 +5012,69 @@ def _list_owners_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if identity_type is not None: - - _query_params.append(('identity_type', identity_type.value)) - + + _query_params.append(("identity_type", identity_type.value)) + if all_users is not None: - - _query_params.append(('all_users', all_users)) - + + _query_params.append(("all_users", all_users)) + if all_groups is not None: - - _query_params.append(('all_groups', all_groups)) - + + _query_params.append(("all_groups", all_groups)) + if details is not None: - - _query_params.append(('details', details)) - + + _query_params.append(("details", details)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/orgs/{org_id}/owners', + method="GET", + resource_path="/api/orgs/{org_id}/owners", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5666,12 +5084,9 @@ def _list_owners_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -5680,10 +5095,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5718,7 +5130,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( org_id=org_id, @@ -5726,23 +5138,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Org", + "200": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -5751,10 +5159,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5789,7 +5194,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( org_id=org_id, @@ -5797,23 +5202,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Org", + "200": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -5822,10 +5223,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5860,7 +5258,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( org_id=org_id, @@ -5868,19 +5266,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Org", + "200": "Org", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, org_id, @@ -5893,21 +5287,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id # process the query parameters # process the header parameters # process the form parameters @@ -5915,37 +5306,24 @@ def _update_serialize( if org_update is not None: _body_params = org_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/orgs/{org_id}', + method="PATCH", + resource_path="/api/orgs/{org_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5955,12 +5333,9 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_invitation( self, @@ -5970,10 +5345,7 @@ async def update_invitation( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6009,7 +5381,7 @@ async def update_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( org_id=org_id, @@ -6018,23 +5390,19 @@ async def update_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitation", + "200": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_invitation_with_http_info( self, @@ -6044,10 +5412,7 @@ async def update_invitation_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6083,7 +5448,7 @@ async def update_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( org_id=org_id, @@ -6092,23 +5457,19 @@ async def update_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitation", + "200": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_invitation_without_preload_content( self, @@ -6118,10 +5479,7 @@ async def update_invitation_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6157,7 +5515,7 @@ async def update_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( org_id=org_id, @@ -6166,19 +5524,15 @@ async def update_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrgInvitation", + "200": "OrgInvitation", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_invitation_serialize( self, org_id, @@ -6192,23 +5546,20 @@ def _update_invitation_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if invitation_id is not None: - _path_params['invitation_id'] = invitation_id + _path_params["invitation_id"] = invitation_id # process the query parameters # process the header parameters # process the form parameters @@ -6216,37 +5567,24 @@ def _update_invitation_serialize( if org_invitation_update is not None: _body_params = org_invitation_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/orgs/{org_id}/invitations/{invitation_id}', + method="PATCH", + resource_path="/api/orgs/{org_id}/invitations/{invitation_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6256,12 +5594,9 @@ def _update_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_member( self, @@ -6271,10 +5606,7 @@ async def update_member( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6310,7 +5642,7 @@ async def update_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_member_serialize( org_id=org_id, @@ -6319,23 +5651,19 @@ async def update_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUserDetailed", + "200": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_member_with_http_info( self, @@ -6345,10 +5673,7 @@ async def update_member_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6384,7 +5709,7 @@ async def update_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_member_serialize( org_id=org_id, @@ -6393,23 +5718,19 @@ async def update_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUserDetailed", + "200": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_member_without_preload_content( self, @@ -6419,10 +5740,7 @@ async def update_member_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6458,7 +5776,7 @@ async def update_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_member_serialize( org_id=org_id, @@ -6467,19 +5785,15 @@ async def update_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OwnerUserDetailed", + "200": "OwnerUserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_member_serialize( self, org_id, @@ -6493,23 +5807,20 @@ def _update_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if org_id is not None: - _path_params['org_id'] = org_id + _path_params["org_id"] = org_id if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -6517,37 +5828,24 @@ def _update_member_serialize( if org_member_update is not None: _body_params = org_member_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/orgs/{org_id}/members/{user_id}', + method="PATCH", + resource_path="/api/orgs/{org_id}/members/{user_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6557,7 +5855,5 @@ def _update_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/recipes_api.py b/saturn_api/api/recipes_api.py index 1aa0ce7..43ef3a9 100644 --- a/saturn_api/api/recipes_api.py +++ b/saturn_api/api/recipes_api.py @@ -1,28 +1,31 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated -from saturn_api.models.recipe import Recipe -from saturn_api.models.recipe_list import RecipeList from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.recipe import Recipe +from saturn_api.models.recipe_list import RecipeList from saturn_api.rest import RESTResponseType @@ -38,7 +41,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def apply( self, @@ -46,10 +48,7 @@ async def apply( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -81,30 +80,26 @@ async def apply( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._apply_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Recipe", + "201": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def apply_with_http_info( self, @@ -112,10 +107,7 @@ async def apply_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,30 +139,26 @@ async def apply_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._apply_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Recipe", + "201": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def apply_without_preload_content( self, @@ -178,10 +166,7 @@ async def apply_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -213,26 +198,22 @@ async def apply_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._apply_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Recipe", + "201": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _apply_serialize( self, recipe, @@ -244,16 +225,13 @@ def _apply_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -264,37 +242,24 @@ def _apply_serialize( if recipe is not None: _body_params = recipe - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/recipes', + method="PUT", + resource_path="/api/recipes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -304,12 +269,9 @@ def _apply_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create( self, @@ -317,10 +279,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -353,30 +312,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Recipe", + "201": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -384,10 +339,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -420,30 +372,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Recipe", + "201": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -451,10 +399,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -487,26 +432,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( recipe=recipe, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Recipe", + "201": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, recipe, @@ -518,16 +459,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -538,37 +476,24 @@ def _create_serialize( if recipe is not None: _body_params = recipe - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/recipes', + method="POST", + resource_path="/api/recipes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -578,31 +503,38 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, recipe_type: StrictStr, name: StrictStr, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, as_template: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -650,7 +582,7 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( recipe_type=recipe_type, @@ -665,42 +597,48 @@ async def get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Recipe", + "200": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, recipe_type: StrictStr, name: StrictStr, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, as_template: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -748,7 +686,7 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( recipe_type=recipe_type, @@ -763,42 +701,48 @@ async def get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Recipe", + "200": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, recipe_type: StrictStr, name: StrictStr, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, as_template: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -846,7 +790,7 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( recipe_type=recipe_type, @@ -861,19 +805,15 @@ async def get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Recipe", + "200": "Recipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, recipe_type, @@ -893,74 +833,63 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if recipe_type is not None: - _path_params['recipe_type'] = recipe_type + _path_params["recipe_type"] = recipe_type if name is not None: - _path_params['name'] = name + _path_params["name"] = name # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if as_template is not None: - - _query_params.append(('as_template', as_template)) - + + _query_params.append(("as_template", as_template)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/recipes/{recipe_type}/{name}', + method="GET", + resource_path="/api/recipes/{recipe_type}/{name}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -970,35 +899,47 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, type: Optional[StrictStr] = None, name: Optional[StrictStr] = None, as_template: Optional[StrictBool] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1055,7 +996,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1074,46 +1015,57 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeList", + "200": "RecipeList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, type: Optional[StrictStr] = None, name: Optional[StrictStr] = None, as_template: Optional[StrictBool] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1170,7 +1122,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1189,46 +1141,57 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeList", + "200": "RecipeList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, type: Optional[StrictStr] = None, name: Optional[StrictStr] = None, as_template: Optional[StrictBool] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1285,7 +1248,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1304,19 +1267,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeList", + "200": "RecipeList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -1340,94 +1299,83 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if type is not None: - - _query_params.append(('type', type)) - + + _query_params.append(("type", type)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if as_template is not None: - - _query_params.append(('as_template', as_template)) - + + _query_params.append(("as_template", as_template)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/recipes', + method="GET", + resource_path="/api/recipes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1437,7 +1385,5 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/secrets_api.py b/saturn_api/api/secrets_api.py index a0d48c5..b023184 100644 --- a/saturn_api/api/secrets_api.py +++ b/saturn_api/api/secrets_api.py @@ -1,31 +1,34 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.secret import Secret from saturn_api.models.secret_access_level import SecretAccessLevel from saturn_api.models.secret_create import SecretCreate from saturn_api.models.secret_list import SecretList from saturn_api.models.secret_update import SecretUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -41,7 +44,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -49,10 +51,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,30 +84,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( secret_create=secret_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Secret", + "201": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -116,10 +111,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,30 +144,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( secret_create=secret_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Secret", + "201": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -183,10 +171,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,26 +204,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( secret_create=secret_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Secret", + "201": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, secret_create, @@ -250,16 +231,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,37 +248,24 @@ def _create_serialize( if secret_create is not None: _body_params = secret_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/secrets', + method="POST", + resource_path="/api/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -310,12 +275,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -323,10 +285,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -359,30 +318,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -390,10 +345,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -426,30 +378,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -457,10 +405,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -493,26 +438,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, secret_id, @@ -524,37 +465,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if secret_id is not None: - _path_params['secret_id'] = secret_id + _path_params["secret_id"] = secret_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/secrets/{secret_id}', + method="DELETE", + resource_path="/api/secrets/{secret_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -564,12 +497,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -577,10 +507,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -613,30 +540,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Secret", + "200": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -644,10 +567,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -680,30 +600,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Secret", + "200": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -711,10 +627,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -747,26 +660,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( secret_id=secret_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Secret", + "200": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, secret_id, @@ -778,44 +687,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if secret_id is not None: - _path_params['secret_id'] = secret_id + _path_params["secret_id"] = secret_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/secrets/{secret_id}', + method="GET", + resource_path="/api/secrets/{secret_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -825,34 +723,51 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret name.")] = None, - access: Annotated[Optional[SecretAccessLevel], Field(description="Filter secrets by access level.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret name."), + ] = None, + access: Annotated[ + Optional[SecretAccessLevel], Field(description="Filter secrets by access level.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -907,7 +822,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -925,45 +840,61 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretList", + "200": "SecretList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret name.")] = None, - access: Annotated[Optional[SecretAccessLevel], Field(description="Filter secrets by access level.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret name."), + ] = None, + access: Annotated[ + Optional[SecretAccessLevel], Field(description="Filter secrets by access level.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1018,7 +949,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1036,45 +967,61 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretList", + "200": "SecretList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret name.")] = None, - access: Annotated[Optional[SecretAccessLevel], Field(description="Filter secrets by access level.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret name."), + ] = None, + access: Annotated[ + Optional[SecretAccessLevel], Field(description="Filter secrets by access level.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1129,7 +1076,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1147,19 +1094,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretList", + "200": "SecretList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -1182,90 +1125,79 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if access is not None: - - _query_params.append(('access', access.value)) - + + _query_params.append(("access", access.value)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/secrets', + method="GET", + resource_path="/api/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1275,12 +1207,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1289,10 +1218,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1327,7 +1253,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( secret_id=secret_id, @@ -1335,23 +1261,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Secret", + "200": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1360,10 +1282,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1398,7 +1317,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( secret_id=secret_id, @@ -1406,23 +1325,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Secret", + "200": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1431,10 +1346,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1469,7 +1381,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( secret_id=secret_id, @@ -1477,19 +1389,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Secret", + "200": "Secret", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, secret_id, @@ -1502,21 +1410,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if secret_id is not None: - _path_params['secret_id'] = secret_id + _path_params["secret_id"] = secret_id # process the query parameters # process the header parameters # process the form parameters @@ -1524,37 +1429,24 @@ def _update_serialize( if secret_update is not None: _body_params = secret_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/secrets/{secret_id}', + method="PATCH", + resource_path="/api/secrets/{secret_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1564,7 +1456,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/service_account_entitlements_api.py b/saturn_api/api/service_account_entitlements_api.py index b929d6f..4d1a8c4 100644 --- a/saturn_api/api/service_account_entitlements_api.py +++ b/saturn_api/api/service_account_entitlements_api.py @@ -1,29 +1,36 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated -from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement -from saturn_api.models.service_account_entitlement_create import ServiceAccountEntitlementCreate -from saturn_api.models.service_account_entitlement_list import ServiceAccountEntitlementList from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement +from saturn_api.models.service_account_entitlement_create import ( + ServiceAccountEntitlementCreate, +) +from saturn_api.models.service_account_entitlement_list import ( + ServiceAccountEntitlementList, +) from saturn_api.rest import RESTResponseType @@ -39,7 +46,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -47,10 +53,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,30 +86,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_entitlement_create=service_account_entitlement_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountEntitlement", + "201": "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -114,10 +113,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,30 +146,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_entitlement_create=service_account_entitlement_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountEntitlement", + "201": "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -181,10 +173,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,26 +206,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_entitlement_create=service_account_entitlement_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountEntitlement", + "201": "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, service_account_entitlement_create, @@ -248,16 +233,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -268,37 +250,24 @@ def _create_serialize( if service_account_entitlement_create is not None: _body_params = service_account_entitlement_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/service_account_entitlements', + method="POST", + resource_path="/api/service_account_entitlements", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -308,12 +277,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -321,10 +287,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -357,30 +320,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -388,10 +347,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -424,30 +380,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -455,10 +407,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -491,26 +440,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, service_account_entitlement_id, @@ -522,37 +467,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_entitlement_id is not None: - _path_params['service_account_entitlement_id'] = service_account_entitlement_id + _path_params["service_account_entitlement_id"] = service_account_entitlement_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/service_account_entitlements/{service_account_entitlement_id}', + method="DELETE", + resource_path="/api/service_account_entitlements/{service_account_entitlement_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -562,12 +499,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -575,10 +509,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -611,30 +542,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountEntitlement", + "200": "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -642,10 +569,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -678,30 +602,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountEntitlement", + "200": "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -709,10 +629,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -745,26 +662,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_entitlement_id=service_account_entitlement_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountEntitlement", + "200": "ServiceAccountEntitlement", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, service_account_entitlement_id, @@ -776,44 +689,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_entitlement_id is not None: - _path_params['service_account_entitlement_id'] = service_account_entitlement_id + _path_params["service_account_entitlement_id"] = service_account_entitlement_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/service_account_entitlements/{service_account_entitlement_id}', + method="GET", + resource_path="/api/service_account_entitlements/{service_account_entitlement_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -823,30 +725,39 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on entitled service account name.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on entitled service account name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -893,7 +804,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -907,41 +818,49 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountEntitlementList", + "200": "ServiceAccountEntitlementList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on entitled service account name.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on entitled service account name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -988,7 +907,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1002,41 +921,49 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountEntitlementList", + "200": "ServiceAccountEntitlementList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on entitled service account name.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on entitled service account name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1083,7 +1010,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1097,19 +1024,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountEntitlementList", + "200": "ServiceAccountEntitlementList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, user_id, @@ -1128,74 +1051,63 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if identity is not None: - - _query_params.append(('identity', identity)) - + + _query_params.append(("identity", identity)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/service_account_entitlements', + method="GET", + resource_path="/api/service_account_entitlements", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1205,7 +1117,5 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/service_accounts_api.py b/saturn_api/api/service_accounts_api.py index d64e7c7..8570225 100644 --- a/saturn_api/api/service_accounts_api.py +++ b/saturn_api/api/service_accounts_api.py @@ -1,30 +1,25 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.service_account import ServiceAccount from saturn_api.models.service_account_create import ServiceAccountCreate from saturn_api.models.service_account_list import ServiceAccountList from saturn_api.models.service_account_update import ServiceAccountUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,7 +35,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +42,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +75,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_create=service_account_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccount", + "201": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +102,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +135,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_create=service_account_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccount", + "201": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +162,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +195,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( service_account_create=service_account_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccount", + "201": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, service_account_create, @@ -249,16 +222,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +239,24 @@ def _create_serialize( if service_account_create is not None: _body_params = service_account_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/service_accounts', + method="POST", + resource_path="/api/service_accounts", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +266,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +276,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +309,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +336,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +369,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +396,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +429,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, service_account_id, @@ -523,37 +456,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_id is not None: - _path_params['service_account_id'] = service_account_id + _path_params["service_account_id"] = service_account_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/service_accounts/{service_account_id}', + method="DELETE", + resource_path="/api/service_accounts/{service_account_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +488,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +498,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +531,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccount", + "200": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +558,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +591,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccount", + "200": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +618,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +651,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( service_account_id=service_account_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccount", + "200": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, service_account_id, @@ -777,44 +678,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_id is not None: - _path_params['service_account_id'] = service_account_id + _path_params["service_account_id"] = service_account_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/service_accounts/{service_account_id}', + method="GET", + resource_path="/api/service_accounts/{service_account_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,27 +714,29 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on service account name.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on service account name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -885,7 +777,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -896,38 +788,39 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountList", + "200": "ServiceAccountList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on service account name.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on service account name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -968,7 +861,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -979,38 +872,39 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountList", + "200": "ServiceAccountList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on service account name.")] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on service account name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1051,7 +945,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( name=name, @@ -1062,19 +956,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountList", + "200": "ServiceAccountList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, name, @@ -1090,62 +980,51 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/service_accounts', + method="GET", + resource_path="/api/service_accounts", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1155,12 +1034,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1169,10 +1045,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1207,7 +1080,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( service_account_id=service_account_id, @@ -1215,23 +1088,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccount", + "200": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1240,10 +1109,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1278,7 +1144,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( service_account_id=service_account_id, @@ -1286,23 +1152,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccount", + "200": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1311,10 +1173,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1349,7 +1208,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( service_account_id=service_account_id, @@ -1357,19 +1216,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccount", + "200": "ServiceAccount", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, service_account_id, @@ -1382,21 +1237,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if service_account_id is not None: - _path_params['service_account_id'] = service_account_id + _path_params["service_account_id"] = service_account_id # process the query parameters # process the header parameters # process the form parameters @@ -1404,37 +1256,24 @@ def _update_serialize( if service_account_update is not None: _body_params = service_account_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/service_accounts/{service_account_id}', + method="PATCH", + resource_path="/api/service_accounts/{service_account_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1444,7 +1283,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/shared_folder_attachments_api.py b/saturn_api/api/shared_folder_attachments_api.py index ec69639..4cd3356 100644 --- a/saturn_api/api/shared_folder_attachments_api.py +++ b/saturn_api/api/shared_folder_attachments_api.py @@ -1,30 +1,29 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from saturn_api.models.shared_folder_attachment import SharedFolderAttachment -from saturn_api.models.shared_folder_attachment_create import SharedFolderAttachmentCreate -from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList -from saturn_api.models.shared_folder_attachment_update import SharedFolderAttachmentUpdate from saturn_api.api_client import ApiClient, RequestSerialized from saturn_api.api_response import ApiResponse +from saturn_api.models.shared_folder_attachment import SharedFolderAttachment +from saturn_api.models.shared_folder_attachment_create import ( + SharedFolderAttachmentCreate, +) +from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList +from saturn_api.models.shared_folder_attachment_update import ( + SharedFolderAttachmentUpdate, +) from saturn_api.rest import RESTResponseType @@ -40,7 +39,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +46,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +79,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_attachment_create=shared_folder_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SharedFolderAttachment", + "201": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +106,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +139,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_attachment_create=shared_folder_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SharedFolderAttachment", + "201": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +166,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +199,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_attachment_create=shared_folder_attachment_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SharedFolderAttachment", + "201": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, shared_folder_attachment_create, @@ -249,16 +226,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +243,24 @@ def _create_serialize( if shared_folder_attachment_create is not None: _body_params = shared_folder_attachment_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/shared_folder_attachments', + method="POST", + resource_path="/api/shared_folder_attachments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +270,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +280,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +313,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +340,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +373,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +400,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +433,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, shared_folder_attachment_id, @@ -523,37 +460,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_attachment_id is not None: - _path_params['shared_folder_attachment_id'] = shared_folder_attachment_id + _path_params["shared_folder_attachment_id"] = shared_folder_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/shared_folder_attachments/{shared_folder_attachment_id}', + method="DELETE", + resource_path="/api/shared_folder_attachments/{shared_folder_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +492,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +502,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +535,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachment", + "200": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +562,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +595,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachment", + "200": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +622,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +655,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_attachment_id=shared_folder_attachment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachment", + "200": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, shared_folder_attachment_id, @@ -777,44 +682,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_attachment_id is not None: - _path_params['shared_folder_attachment_id'] = shared_folder_attachment_id + _path_params["shared_folder_attachment_id"] = shared_folder_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/shared_folder_attachments/{shared_folder_attachment_id}', + method="GET", + resource_path="/api/shared_folder_attachments/{shared_folder_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,29 +718,32 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, - workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, + deployment_id: Annotated[ + Optional[StrictStr], Field(description="Reference by deployment ID.") + ] = None, + workspace_id: Annotated[ + Optional[StrictStr], Field(description="Reference by workspace ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -891,7 +788,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -904,40 +801,42 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachmentList", + "200": "SharedFolderAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, - workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, + deployment_id: Annotated[ + Optional[StrictStr], Field(description="Reference by deployment ID.") + ] = None, + workspace_id: Annotated[ + Optional[StrictStr], Field(description="Reference by workspace ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -982,7 +881,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -995,40 +894,42 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachmentList", + "200": "SharedFolderAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, job_id: Annotated[Optional[StrictStr], Field(description="Reference by job ID.")] = None, - deployment_id: Annotated[Optional[StrictStr], Field(description="Reference by deployment ID.")] = None, - workspace_id: Annotated[Optional[StrictStr], Field(description="Reference by workspace ID.")] = None, + deployment_id: Annotated[ + Optional[StrictStr], Field(description="Reference by deployment ID.") + ] = None, + workspace_id: Annotated[ + Optional[StrictStr], Field(description="Reference by workspace ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1073,7 +974,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( job_id=job_id, @@ -1086,19 +987,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachmentList", + "200": "SharedFolderAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, job_id, @@ -1116,70 +1013,59 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if job_id is not None: - - _query_params.append(('job_id', job_id)) - + + _query_params.append(("job_id", job_id)) + if deployment_id is not None: - - _query_params.append(('deployment_id', deployment_id)) - + + _query_params.append(("deployment_id", deployment_id)) + if workspace_id is not None: - - _query_params.append(('workspace_id', workspace_id)) - + + _query_params.append(("workspace_id", workspace_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/shared_folder_attachments', + method="GET", + resource_path="/api/shared_folder_attachments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1189,12 +1075,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1203,10 +1086,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1241,7 +1121,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_attachment_id=shared_folder_attachment_id, @@ -1249,23 +1129,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachment", + "200": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1274,10 +1150,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1312,7 +1185,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_attachment_id=shared_folder_attachment_id, @@ -1320,23 +1193,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachment", + "200": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1345,10 +1214,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1383,7 +1249,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_attachment_id=shared_folder_attachment_id, @@ -1391,19 +1257,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderAttachment", + "200": "SharedFolderAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, shared_folder_attachment_id, @@ -1416,21 +1278,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_attachment_id is not None: - _path_params['shared_folder_attachment_id'] = shared_folder_attachment_id + _path_params["shared_folder_attachment_id"] = shared_folder_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -1438,37 +1297,24 @@ def _update_serialize( if shared_folder_attachment_update is not None: _body_params = shared_folder_attachment_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/shared_folder_attachments/{shared_folder_attachment_id}', + method="PATCH", + resource_path="/api/shared_folder_attachments/{shared_folder_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1478,7 +1324,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/shared_folders_api.py b/saturn_api/api/shared_folders_api.py index 74a4fdb..fbc9d76 100644 --- a/saturn_api/api/shared_folders_api.py +++ b/saturn_api/api/shared_folders_api.py @@ -1,31 +1,34 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.shared_folder import SharedFolder from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel from saturn_api.models.shared_folder_create import SharedFolderCreate from saturn_api.models.shared_folder_list import SharedFolderList from saturn_api.models.shared_folder_update import SharedFolderUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -41,7 +44,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -49,10 +51,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,30 +84,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_create=shared_folder_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SharedFolder", + "201": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -116,10 +111,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,30 +144,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_create=shared_folder_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SharedFolder", + "201": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -183,10 +171,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,26 +204,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( shared_folder_create=shared_folder_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SharedFolder", + "201": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, shared_folder_create, @@ -250,16 +231,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,37 +248,24 @@ def _create_serialize( if shared_folder_create is not None: _body_params = shared_folder_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/shared_folders', + method="POST", + resource_path="/api/shared_folders", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -310,12 +275,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -323,10 +285,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -359,30 +318,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -390,10 +345,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -426,30 +378,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -457,10 +405,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -493,26 +438,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, shared_folder_id, @@ -524,37 +465,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_id is not None: - _path_params['shared_folder_id'] = shared_folder_id + _path_params["shared_folder_id"] = shared_folder_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/shared_folders/{shared_folder_id}', + method="DELETE", + resource_path="/api/shared_folders/{shared_folder_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -564,12 +497,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -577,10 +507,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -613,30 +540,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolder", + "200": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -644,10 +567,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -680,30 +600,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolder", + "200": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -711,10 +627,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -747,26 +660,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( shared_folder_id=shared_folder_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolder", + "200": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, shared_folder_id, @@ -778,44 +687,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_id is not None: - _path_params['shared_folder_id'] = shared_folder_id + _path_params["shared_folder_id"] = shared_folder_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/shared_folders/{shared_folder_id}', + method="GET", + resource_path="/api/shared_folders/{shared_folder_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -825,34 +723,52 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on shared folder name.")] = None, - access: Annotated[Optional[SharedFolderAccessLevel], Field(description="Filter shared folders by access level.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on shared folder name."), + ] = None, + access: Annotated[ + Optional[SharedFolderAccessLevel], + Field(description="Filter shared folders by access level."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -907,7 +823,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -925,45 +841,62 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderList", + "200": "SharedFolderList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on shared folder name.")] = None, - access: Annotated[Optional[SharedFolderAccessLevel], Field(description="Filter shared folders by access level.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on shared folder name."), + ] = None, + access: Annotated[ + Optional[SharedFolderAccessLevel], + Field(description="Filter shared folders by access level."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1018,7 +951,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1036,45 +969,62 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderList", + "200": "SharedFolderList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on shared folder name.")] = None, - access: Annotated[Optional[SharedFolderAccessLevel], Field(description="Filter shared folders by access level.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on shared folder name."), + ] = None, + access: Annotated[ + Optional[SharedFolderAccessLevel], + Field(description="Filter shared folders by access level."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1129,7 +1079,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -1147,19 +1097,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolderList", + "200": "SharedFolderList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -1182,90 +1128,79 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if access is not None: - - _query_params.append(('access', access.value)) - + + _query_params.append(("access", access.value)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/shared_folders', + method="GET", + resource_path="/api/shared_folders", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1275,12 +1210,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1289,10 +1221,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1327,7 +1256,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_id=shared_folder_id, @@ -1335,23 +1264,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolder", + "200": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1360,10 +1285,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1398,7 +1320,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_id=shared_folder_id, @@ -1406,23 +1328,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolder", + "200": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1431,10 +1349,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1469,7 +1384,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( shared_folder_id=shared_folder_id, @@ -1477,19 +1392,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SharedFolder", + "200": "SharedFolder", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, shared_folder_id, @@ -1502,21 +1413,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if shared_folder_id is not None: - _path_params['shared_folder_id'] = shared_folder_id + _path_params["shared_folder_id"] = shared_folder_id # process the query parameters # process the header parameters # process the form parameters @@ -1524,37 +1432,24 @@ def _update_serialize( if shared_folder_update is not None: _body_params = shared_folder_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/shared_folders/{shared_folder_id}', + method="PATCH", + resource_path="/api/shared_folders/{shared_folder_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1564,7 +1459,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/ssh_private_keys_api.py b/saturn_api/api/ssh_private_keys_api.py index 31a9a3a..9a5d891 100644 --- a/saturn_api/api/ssh_private_keys_api.py +++ b/saturn_api/api/ssh_private_keys_api.py @@ -1,30 +1,33 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.ssh_private_key import SSHPrivateKey from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,7 +43,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +50,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +83,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_private_key_create=ssh_private_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SSHPrivateKey", + "201": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +110,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +143,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_private_key_create=ssh_private_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SSHPrivateKey", + "201": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +170,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +203,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_private_key_create=ssh_private_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SSHPrivateKey", + "201": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, ssh_private_key_create, @@ -249,16 +230,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +247,24 @@ def _create_serialize( if ssh_private_key_create is not None: _body_params = ssh_private_key_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/ssh_private_keys', + method="POST", + resource_path="/api/ssh_private_keys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +274,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +284,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +317,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +344,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +377,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +404,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +437,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, ssh_privatekey_id, @@ -523,37 +464,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_privatekey_id is not None: - _path_params['ssh_privatekey_id'] = ssh_privatekey_id + _path_params["ssh_privatekey_id"] = ssh_privatekey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/ssh_private_keys/{ssh_privatekey_id}', + method="DELETE", + resource_path="/api/ssh_private_keys/{ssh_privatekey_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +496,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +506,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +539,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKey", + "200": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +566,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +599,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKey", + "200": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +626,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +659,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_privatekey_id=ssh_privatekey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKey", + "200": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, ssh_privatekey_id, @@ -777,44 +686,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_privatekey_id is not None: - _path_params['ssh_privatekey_id'] = ssh_privatekey_id + _path_params["ssh_privatekey_id"] = ssh_privatekey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/ssh_private_keys/{ssh_privatekey_id}', + method="GET", + resource_path="/api/ssh_private_keys/{ssh_privatekey_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,31 +722,42 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH private key name.")] = None, - is_default: Annotated[Optional[StrictBool], Field(description="Filter SSH private keys by is_default.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on SSH private key name."), + ] = None, + is_default: Annotated[ + Optional[StrictBool], Field(description="Filter SSH private keys by is_default.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -897,7 +806,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -912,42 +821,52 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKeyList", + "200": "SSHPrivateKeyList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH private key name.")] = None, - is_default: Annotated[Optional[StrictBool], Field(description="Filter SSH private keys by is_default.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on SSH private key name."), + ] = None, + is_default: Annotated[ + Optional[StrictBool], Field(description="Filter SSH private keys by is_default.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -996,7 +915,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1011,42 +930,52 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKeyList", + "200": "SSHPrivateKeyList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH private key name.")] = None, - is_default: Annotated[Optional[StrictBool], Field(description="Filter SSH private keys by is_default.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on SSH private key name."), + ] = None, + is_default: Annotated[ + Optional[StrictBool], Field(description="Filter SSH private keys by is_default.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1095,7 +1024,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1110,19 +1039,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKeyList", + "200": "SSHPrivateKeyList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, user_id, @@ -1142,78 +1067,67 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if identity is not None: - - _query_params.append(('identity', identity)) - + + _query_params.append(("identity", identity)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if is_default is not None: - - _query_params.append(('is_default', is_default)) - + + _query_params.append(("is_default", is_default)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/ssh_private_keys', + method="GET", + resource_path="/api/ssh_private_keys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1223,12 +1137,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1237,10 +1148,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1275,7 +1183,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_privatekey_id=ssh_privatekey_id, @@ -1283,23 +1191,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKey", + "200": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1308,10 +1212,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1346,7 +1247,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_privatekey_id=ssh_privatekey_id, @@ -1354,23 +1255,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKey", + "200": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1379,10 +1276,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1417,7 +1311,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_privatekey_id=ssh_privatekey_id, @@ -1425,19 +1319,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPrivateKey", + "200": "SSHPrivateKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, ssh_privatekey_id, @@ -1450,21 +1340,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_privatekey_id is not None: - _path_params['ssh_privatekey_id'] = ssh_privatekey_id + _path_params["ssh_privatekey_id"] = ssh_privatekey_id # process the query parameters # process the header parameters # process the form parameters @@ -1472,37 +1359,24 @@ def _update_serialize( if ssh_private_key_update is not None: _body_params = ssh_private_key_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/ssh_private_keys/{ssh_privatekey_id}', + method="PATCH", + resource_path="/api/ssh_private_keys/{ssh_privatekey_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1512,7 +1386,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/ssh_public_keys_api.py b/saturn_api/api/ssh_public_keys_api.py index ef81cf5..476d5f2 100644 --- a/saturn_api/api/ssh_public_keys_api.py +++ b/saturn_api/api/ssh_public_keys_api.py @@ -1,30 +1,33 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.ssh_public_key import SSHPublicKey from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate from saturn_api.models.ssh_public_key_list import SSHPublicKeyList from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -40,7 +43,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -48,10 +50,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,30 +83,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_public_key_create=ssh_public_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SSHPublicKey", + "201": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -115,10 +110,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -151,30 +143,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_public_key_create=ssh_public_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SSHPublicKey", + "201": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -182,10 +170,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,26 +203,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( ssh_public_key_create=ssh_public_key_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SSHPublicKey", + "201": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, ssh_public_key_create, @@ -249,16 +230,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,37 +247,24 @@ def _create_serialize( if ssh_public_key_create is not None: _body_params = ssh_public_key_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/ssh_public_keys', + method="POST", + resource_path="/api/ssh_public_keys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,12 +274,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -322,10 +284,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -358,30 +317,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -389,10 +344,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,30 +377,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -456,10 +404,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,26 +437,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, ssh_publickey_id, @@ -523,37 +464,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_publickey_id is not None: - _path_params['ssh_publickey_id'] = ssh_publickey_id + _path_params["ssh_publickey_id"] = ssh_publickey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/ssh_public_keys/{ssh_publickey_id}', + method="DELETE", + resource_path="/api/ssh_public_keys/{ssh_publickey_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,12 +496,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -576,10 +506,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -612,30 +539,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKey", + "200": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -643,10 +566,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -679,30 +599,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKey", + "200": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -710,10 +626,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,26 +659,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( ssh_publickey_id=ssh_publickey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKey", + "200": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, ssh_publickey_id, @@ -777,44 +686,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_publickey_id is not None: - _path_params['ssh_publickey_id'] = ssh_publickey_id + _path_params["ssh_publickey_id"] = ssh_publickey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/ssh_public_keys/{ssh_publickey_id}', + method="GET", + resource_path="/api/ssh_public_keys/{ssh_publickey_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,30 +722,39 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH public key name.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on SSH public key name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -894,7 +801,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -908,41 +815,49 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKeyList", + "200": "SSHPublicKeyList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH public key name.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on SSH public key name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -989,7 +904,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1003,41 +918,49 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKeyList", + "200": "SSHPublicKeyList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - user_id: Annotated[Optional[StrictStr], Field(description="Identity reference by user ID")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Identity reference by group ID")] = None, - identity: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Identity reference by name")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on SSH public key name.")] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by user ID") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Identity reference by group ID") + ] = None, + identity: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Identity reference by name"), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on SSH public key name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1084,7 +1007,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( user_id=user_id, @@ -1098,19 +1021,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKeyList", + "200": "SSHPublicKeyList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, user_id, @@ -1129,74 +1048,63 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if identity is not None: - - _query_params.append(('identity', identity)) - + + _query_params.append(("identity", identity)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/ssh_public_keys', + method="GET", + resource_path="/api/ssh_public_keys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1206,12 +1114,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1220,10 +1125,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1258,7 +1160,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_publickey_id=ssh_publickey_id, @@ -1266,23 +1168,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKey", + "200": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1291,10 +1189,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1329,7 +1224,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_publickey_id=ssh_publickey_id, @@ -1337,23 +1232,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKey", + "200": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1362,10 +1253,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1400,7 +1288,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( ssh_publickey_id=ssh_publickey_id, @@ -1408,19 +1296,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SSHPublicKey", + "200": "SSHPublicKey", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, ssh_publickey_id, @@ -1433,21 +1317,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if ssh_publickey_id is not None: - _path_params['ssh_publickey_id'] = ssh_publickey_id + _path_params["ssh_publickey_id"] = ssh_publickey_id # process the query parameters # process the header parameters # process the form parameters @@ -1455,37 +1336,24 @@ def _update_serialize( if ssh_public_key_update is not None: _body_params = ssh_public_key_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/ssh_public_keys/{ssh_publickey_id}', + method="PATCH", + resource_path="/api/ssh_public_keys/{ssh_publickey_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1495,7 +1363,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/users_api.py b/saturn_api/api/users_api.py index 4c7e52f..20e6a6c 100644 --- a/saturn_api/api/users_api.py +++ b/saturn_api/api/users_api.py @@ -1,31 +1,26 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.user_admin_create import UserAdminCreate from saturn_api.models.user_detailed import UserDetailed from saturn_api.models.user_update import UserUpdate from saturn_api.models.users_get200_response import UsersGet200Response from saturn_api.models.users_list200_response import UsersList200Response - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -41,7 +36,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -49,10 +43,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -85,30 +76,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( user_admin_create=user_admin_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserDetailed", + "201": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -116,10 +103,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,30 +136,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( user_admin_create=user_admin_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserDetailed", + "201": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -183,10 +163,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,26 +196,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( user_admin_create=user_admin_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserDetailed", + "201": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, user_admin_create, @@ -250,16 +223,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,37 +240,24 @@ def _create_serialize( if user_admin_create is not None: _body_params = user_admin_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/users', + method="POST", + resource_path="/api/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -310,12 +267,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, @@ -323,10 +277,7 @@ async def delete( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -359,30 +310,26 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, @@ -390,10 +337,7 @@ async def delete_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -426,30 +370,26 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, @@ -457,10 +397,7 @@ async def delete_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -493,26 +430,22 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, user_id, @@ -524,37 +457,29 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/users/{user_id}', + method="DELETE", + resource_path="/api/users/{user_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -564,24 +489,20 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, user_id: StrictStr, - details: Annotated[Optional[StrictBool], Field(description="Retrive detailed user data.")] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrive detailed user data.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -616,7 +537,7 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( user_id=user_id, @@ -624,35 +545,30 @@ async def get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsersGet200Response", + "200": "UsersGet200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, user_id: StrictStr, - details: Annotated[Optional[StrictBool], Field(description="Retrive detailed user data.")] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrive detailed user data.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -687,7 +603,7 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( user_id=user_id, @@ -695,35 +611,30 @@ async def get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsersGet200Response", + "200": "UsersGet200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, user_id: StrictStr, - details: Annotated[Optional[StrictBool], Field(description="Retrive detailed user data.")] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrive detailed user data.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -758,7 +669,7 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( user_id=user_id, @@ -766,19 +677,15 @@ async def get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsersGet200Response", + "200": "UsersGet200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, user_id, @@ -791,48 +698,37 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters if details is not None: - - _query_params.append(('details', details)) - + + _query_params.append(("details", details)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/users/{user_id}', + method="GET", + resource_path="/api/users/{user_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -842,29 +738,34 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - username: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user name.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user email.")] = None, - details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)")] = None, + username: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on user name.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on user email.") + ] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -909,7 +810,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( username=username, @@ -922,40 +823,44 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsersList200Response", + "200": "UsersList200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - username: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user name.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user email.")] = None, - details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)")] = None, + username: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on user name.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on user email.") + ] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1000,7 +905,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( username=username, @@ -1013,40 +918,44 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsersList200Response", + "200": "UsersList200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - username: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user name.")] = None, - email: Annotated[Optional[StrictStr], Field(description="Substring matched search string on user email.")] = None, - details: Annotated[Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)")] = None, + username: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on user name.") + ] = None, + email: Annotated[ + Optional[StrictStr], Field(description="Substring matched search string on user email.") + ] = None, + details: Annotated[ + Optional[StrictBool], Field(description="Retrieve detailed user data. (Admin only)") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1091,7 +1000,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( username=username, @@ -1104,19 +1013,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UsersList200Response", + "200": "UsersList200Response", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, username, @@ -1134,70 +1039,59 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if username is not None: - - _query_params.append(('username', username)) - + + _query_params.append(("username", username)) + if email is not None: - - _query_params.append(('email', email)) - + + _query_params.append(("email", email)) + if details is not None: - - _query_params.append(('details', details)) - + + _query_params.append(("details", details)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/users', + method="GET", + resource_path="/api/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1207,12 +1101,9 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -1221,10 +1112,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1259,7 +1147,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_id=user_id, @@ -1267,23 +1155,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", + "200": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -1292,10 +1176,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1330,7 +1211,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_id=user_id, @@ -1338,23 +1219,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", + "200": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -1363,10 +1240,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1401,7 +1275,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( user_id=user_id, @@ -1409,19 +1283,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDetailed", + "200": "UserDetailed", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, user_id, @@ -1434,21 +1304,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if user_id is not None: - _path_params['user_id'] = user_id + _path_params["user_id"] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -1456,37 +1323,24 @@ def _update_serialize( if user_update is not None: _body_params = user_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/users/{user_id}', + method="PATCH", + resource_path="/api/users/{user_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1496,7 +1350,5 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api/workspaces_api.py b/saturn_api/api/workspaces_api.py index 37c9e24..9cd3ec9 100644 --- a/saturn_api/api/workspaces_api.py +++ b/saturn_api/api/workspaces_api.py @@ -1,24 +1,30 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated -from datetime import datetime -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import ( + Field, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + field_validator, + validate_call, +) from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.models.metrics import Metrics from saturn_api.models.resource_clusters import ResourceClusters @@ -36,7 +42,9 @@ from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_attachment_update import SecretAttachmentUpdate from saturn_api.models.service_account_attachment import ServiceAccountAttachment -from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment +from saturn_api.models.service_account_create_attachment import ( + ServiceAccountCreateAttachment, +) from saturn_api.models.viewer import Viewer from saturn_api.models.viewer_create import ViewerCreate from saturn_api.models.viewer_list import ViewerList @@ -48,9 +56,6 @@ from saturn_api.models.workspace_server_info import WorkspaceServerInfo from saturn_api.models.workspace_start import WorkspaceStart from saturn_api.models.workspace_update import WorkspaceUpdate - -from saturn_api.api_client import ApiClient, RequestSerialized -from saturn_api.api_response import ApiResponse from saturn_api.rest import RESTResponseType @@ -66,7 +71,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call async def create( self, @@ -74,10 +78,7 @@ async def create( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -110,30 +111,26 @@ async def create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( workspace_create=workspace_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Workspace", + "201": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_with_http_info( self, @@ -141,10 +138,7 @@ async def create_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -177,30 +171,26 @@ async def create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( workspace_create=workspace_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Workspace", + "201": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_without_preload_content( self, @@ -208,10 +198,7 @@ async def create_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -244,26 +231,22 @@ async def create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_serialize( workspace_create=workspace_create, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Workspace", + "201": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_serialize( self, workspace_create, @@ -275,16 +258,13 @@ def _create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -295,37 +275,24 @@ def _create_serialize( if workspace_create is not None: _body_params = workspace_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces', + method="POST", + resource_path="/api/workspaces", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -335,12 +302,9 @@ def _create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_resource_template( self, @@ -348,10 +312,7 @@ async def create_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -383,30 +344,26 @@ async def create_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_resource_template_with_http_info( self, @@ -414,10 +371,7 @@ async def create_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -449,30 +403,26 @@ async def create_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_resource_template_without_preload_content( self, @@ -480,10 +430,7 @@ async def create_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -515,26 +462,22 @@ async def create_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ResourceTemplate", + "201": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_resource_template_serialize( self, workspace_id, @@ -546,44 +489,33 @@ def _create_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/template', + method="POST", + resource_path="/api/workspaces/{workspace_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -593,12 +525,9 @@ def _create_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_route( self, @@ -607,10 +536,7 @@ async def create_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -645,7 +571,7 @@ async def create_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( workspace_id=workspace_id, @@ -653,23 +579,19 @@ async def create_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Route", + "201": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_route_with_http_info( self, @@ -678,10 +600,7 @@ async def create_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -716,7 +635,7 @@ async def create_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( workspace_id=workspace_id, @@ -724,23 +643,19 @@ async def create_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Route", + "201": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_route_without_preload_content( self, @@ -749,10 +664,7 @@ async def create_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -787,7 +699,7 @@ async def create_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_route_serialize( workspace_id=workspace_id, @@ -795,19 +707,15 @@ async def create_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Route", + "201": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_route_serialize( self, workspace_id, @@ -820,21 +728,18 @@ def _create_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -842,37 +747,24 @@ def _create_route_serialize( if route_create is not None: _body_params = route_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/routes', + method="POST", + resource_path="/api/workspaces/{workspace_id}/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -882,12 +774,9 @@ def _create_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_secret_attachment( self, @@ -896,10 +785,7 @@ async def create_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -933,7 +819,7 @@ async def create_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( workspace_id=workspace_id, @@ -941,23 +827,19 @@ async def create_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_secret_attachment_with_http_info( self, @@ -966,10 +848,7 @@ async def create_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1003,7 +882,7 @@ async def create_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( workspace_id=workspace_id, @@ -1011,23 +890,19 @@ async def create_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_secret_attachment_without_preload_content( self, @@ -1036,10 +911,7 @@ async def create_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1073,7 +945,7 @@ async def create_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_attachment_serialize( workspace_id=workspace_id, @@ -1081,19 +953,15 @@ async def create_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SecretAttachment", + "201": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_secret_attachment_serialize( self, workspace_id, @@ -1106,21 +974,18 @@ def _create_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -1128,37 +993,24 @@ def _create_secret_attachment_serialize( if secret_attachment_create is not None: _body_params = secret_attachment_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/secrets', + method="POST", + resource_path="/api/workspaces/{workspace_id}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1168,12 +1020,9 @@ def _create_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_service_account_attachment( self, @@ -1182,10 +1031,7 @@ async def create_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1219,7 +1065,7 @@ async def create_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( workspace_id=workspace_id, @@ -1227,23 +1073,19 @@ async def create_service_account_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_service_account_attachment_with_http_info( self, @@ -1252,10 +1094,7 @@ async def create_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1289,7 +1128,7 @@ async def create_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( workspace_id=workspace_id, @@ -1297,23 +1136,19 @@ async def create_service_account_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_service_account_attachment_without_preload_content( self, @@ -1322,10 +1157,7 @@ async def create_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1359,7 +1191,7 @@ async def create_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_account_attachment_serialize( workspace_id=workspace_id, @@ -1367,19 +1199,15 @@ async def create_service_account_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ServiceAccountAttachment", + "201": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_service_account_attachment_serialize( self, workspace_id, @@ -1392,21 +1220,18 @@ def _create_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -1414,37 +1239,24 @@ def _create_service_account_attachment_serialize( if service_account_create_attachment is not None: _body_params = service_account_create_attachment - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/workspaces/{workspace_id}/service_account', + method="PUT", + resource_path="/api/workspaces/{workspace_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1454,12 +1266,9 @@ def _create_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def create_viewer( self, @@ -1468,10 +1277,7 @@ async def create_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1506,7 +1312,7 @@ async def create_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( workspace_id=workspace_id, @@ -1514,23 +1320,19 @@ async def create_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Viewer", + "201": "Viewer", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def create_viewer_with_http_info( self, @@ -1539,10 +1341,7 @@ async def create_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1577,7 +1376,7 @@ async def create_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( workspace_id=workspace_id, @@ -1585,23 +1384,19 @@ async def create_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Viewer", + "201": "Viewer", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def create_viewer_without_preload_content( self, @@ -1610,10 +1405,7 @@ async def create_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1648,7 +1440,7 @@ async def create_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_viewer_serialize( workspace_id=workspace_id, @@ -1656,19 +1448,15 @@ async def create_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Viewer", + "201": "Viewer", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_viewer_serialize( self, workspace_id, @@ -1681,21 +1469,18 @@ def _create_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -1703,37 +1488,24 @@ def _create_viewer_serialize( if viewer_create is not None: _body_params = viewer_create - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/viewers', + method="POST", + resource_path="/api/workspaces/{workspace_id}/viewers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1743,24 +1515,21 @@ def _create_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete( self, workspace_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete workspace that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete workspace that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1795,7 +1564,7 @@ async def delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( workspace_id=workspace_id, @@ -1803,35 +1572,31 @@ async def delete( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_with_http_info( self, workspace_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete workspace that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete workspace that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1866,7 +1631,7 @@ async def delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( workspace_id=workspace_id, @@ -1874,35 +1639,31 @@ async def delete_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_without_preload_content( self, workspace_id: StrictStr, - allow_active: Annotated[Optional[StrictBool], Field(description="Force delete workspace that is currently active.")] = None, + allow_active: Annotated[ + Optional[StrictBool], + Field(description="Force delete workspace that is currently active."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1937,7 +1698,7 @@ async def delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_serialize( workspace_id=workspace_id, @@ -1945,19 +1706,15 @@ async def delete_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_serialize( self, workspace_id, @@ -1970,41 +1727,33 @@ def _delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if allow_active is not None: - - _query_params.append(('allow_active', allow_active)) - + + _query_params.append(("allow_active", allow_active)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/workspaces/{workspace_id}', + method="DELETE", + resource_path="/api/workspaces/{workspace_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2014,12 +1763,9 @@ def _delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_route( self, @@ -2028,10 +1774,7 @@ async def delete_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2066,7 +1809,7 @@ async def delete_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( workspace_id=workspace_id, @@ -2074,23 +1817,19 @@ async def delete_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_route_with_http_info( self, @@ -2099,10 +1838,7 @@ async def delete_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2137,7 +1873,7 @@ async def delete_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( workspace_id=workspace_id, @@ -2145,23 +1881,19 @@ async def delete_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_route_without_preload_content( self, @@ -2170,10 +1902,7 @@ async def delete_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2208,7 +1937,7 @@ async def delete_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_route_serialize( workspace_id=workspace_id, @@ -2216,19 +1945,15 @@ async def delete_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_route_serialize( self, workspace_id, @@ -2241,39 +1966,31 @@ def _delete_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if route_id is not None: - _path_params['route_id'] = route_id + _path_params["route_id"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/workspaces/{workspace_id}/routes/{route_id}', + method="DELETE", + resource_path="/api/workspaces/{workspace_id}/routes/{route_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2283,12 +2000,9 @@ def _delete_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_secret_attachment( self, @@ -2297,10 +2011,7 @@ async def delete_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2334,7 +2045,7 @@ async def delete_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( workspace_id=workspace_id, @@ -2342,23 +2053,19 @@ async def delete_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_secret_attachment_with_http_info( self, @@ -2367,10 +2074,7 @@ async def delete_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2404,7 +2108,7 @@ async def delete_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( workspace_id=workspace_id, @@ -2412,23 +2116,19 @@ async def delete_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_secret_attachment_without_preload_content( self, @@ -2437,10 +2137,7 @@ async def delete_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2474,7 +2171,7 @@ async def delete_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_attachment_serialize( workspace_id=workspace_id, @@ -2482,19 +2179,15 @@ async def delete_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_secret_attachment_serialize( self, workspace_id, @@ -2507,39 +2200,31 @@ def _delete_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}', + method="DELETE", + resource_path="/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2549,12 +2234,9 @@ def _delete_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_service_account_attachment( self, @@ -2562,10 +2244,7 @@ async def delete_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2597,30 +2276,26 @@ async def delete_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_service_account_attachment_with_http_info( self, @@ -2628,10 +2303,7 @@ async def delete_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2663,30 +2335,26 @@ async def delete_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_service_account_attachment_without_preload_content( self, @@ -2694,10 +2362,7 @@ async def delete_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2729,26 +2394,22 @@ async def delete_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_service_account_attachment_serialize( self, workspace_id, @@ -2760,37 +2421,29 @@ def _delete_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/workspaces/{workspace_id}/service_account', + method="DELETE", + resource_path="/api/workspaces/{workspace_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2800,12 +2453,9 @@ def _delete_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def delete_viewer( self, @@ -2814,10 +2464,7 @@ async def delete_viewer( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2852,7 +2499,7 @@ async def delete_viewer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( workspace_id=workspace_id, @@ -2860,23 +2507,19 @@ async def delete_viewer( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def delete_viewer_with_http_info( self, @@ -2885,10 +2528,7 @@ async def delete_viewer_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2923,7 +2563,7 @@ async def delete_viewer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( workspace_id=workspace_id, @@ -2931,23 +2571,19 @@ async def delete_viewer_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def delete_viewer_without_preload_content( self, @@ -2956,10 +2592,7 @@ async def delete_viewer_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2994,7 +2627,7 @@ async def delete_viewer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_viewer_serialize( workspace_id=workspace_id, @@ -3002,19 +2635,15 @@ async def delete_viewer_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + "204": None, } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_viewer_serialize( self, workspace_id, @@ -3027,39 +2656,31 @@ def _delete_viewer_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if viewer_id is not None: - _path_params['viewer_id'] = viewer_id + _path_params["viewer_id"] = viewer_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/workspaces/{workspace_id}/viewers/{viewer_id}', + method="DELETE", + resource_path="/api/workspaces/{workspace_id}/viewers/{viewer_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3069,12 +2690,9 @@ def _delete_viewer_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get( self, @@ -3082,10 +2700,7 @@ async def get( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3118,30 +2733,26 @@ async def get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_with_http_info( self, @@ -3149,10 +2760,7 @@ async def get_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3185,30 +2793,26 @@ async def get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_without_preload_content( self, @@ -3216,10 +2820,7 @@ async def get_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3252,26 +2853,22 @@ async def get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_serialize( self, workspace_id, @@ -3283,44 +2880,33 @@ def _get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}', + method="GET", + resource_path="/api/workspaces/{workspace_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3330,12 +2916,9 @@ def _get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_cluster_history( self, @@ -3343,10 +2926,7 @@ async def get_cluster_history( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3379,30 +2959,26 @@ async def get_cluster_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_cluster_history_with_http_info( self, @@ -3410,10 +2986,7 @@ async def get_cluster_history_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3446,30 +3019,26 @@ async def get_cluster_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_cluster_history_without_preload_content( self, @@ -3477,10 +3046,7 @@ async def get_cluster_history_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3513,26 +3079,22 @@ async def get_cluster_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_cluster_history_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceClusters", + "200": "ResourceClusters", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_cluster_history_serialize( self, workspace_id, @@ -3544,44 +3106,33 @@ def _get_cluster_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/clusters', + method="GET", + resource_path="/api/workspaces/{workspace_id}/clusters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3591,28 +3142,29 @@ def _get_cluster_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_logs( self, workspace_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3655,7 +3207,7 @@ async def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( workspace_id=workspace_id, @@ -3667,39 +3219,39 @@ async def get_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_logs_with_http_info( self, workspace_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3742,7 +3294,7 @@ async def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( workspace_id=workspace_id, @@ -3754,39 +3306,39 @@ async def get_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_logs_without_preload_content( self, workspace_id: StrictStr, - pod_name: Annotated[Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Name of the cluster the pod lives in.")] = None, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of results per page.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3829,7 +3381,7 @@ async def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_logs_serialize( workspace_id=workspace_id, @@ -3841,19 +3393,15 @@ async def get_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HistoricLogList", + "200": "HistoricLogList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_serialize( self, workspace_id, @@ -3870,64 +3418,53 @@ def _get_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if pod_name is not None: - - _query_params.append(('pod_name', pod_name)) - + + _query_params.append(("pod_name", pod_name)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/logs', + method="GET", + resource_path="/api/workspaces/{workspace_id}/logs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3937,28 +3474,32 @@ def _get_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_metrics( self, workspace_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4001,7 +3542,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( workspace_id=workspace_id, @@ -4013,39 +3554,42 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_metrics_with_http_info( self, workspace_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4088,7 +3632,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( workspace_id=workspace_id, @@ -4100,39 +3644,42 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_metrics_without_preload_content( self, workspace_id: StrictStr, - type: Annotated[Optional[StrictStr], Field(description="Filter metric series by type.")] = None, - start: Annotated[Optional[datetime], Field(description="Start timestamp of the metrics query.")] = None, - end: Annotated[Optional[datetime], Field(description="End timestamp of the metrics query.")] = None, - resolution: Annotated[Optional[StrictStr], Field(description="Sampling resolution of metrics points.")] = None, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + type: Annotated[ + Optional[StrictStr], Field(description="Filter metric series by type.") + ] = None, + start: Annotated[ + Optional[datetime], Field(description="Start timestamp of the metrics query.") + ] = None, + end: Annotated[ + Optional[datetime], Field(description="End timestamp of the metrics query.") + ] = None, + resolution: Annotated[ + Optional[StrictStr], Field(description="Sampling resolution of metrics points.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4175,7 +3722,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( workspace_id=workspace_id, @@ -4187,19 +3734,15 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", + "200": "Metrics", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_metrics_serialize( self, workspace_id, @@ -4216,82 +3759,61 @@ def _get_metrics_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if type is not None: - - _query_params.append(('type', type)) - + + _query_params.append(("type", type)) + if start is not None: if isinstance(start, datetime): _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("start", start.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.datetime_format - ) - ) + ("end", end.strftime(self.api_client.configuration.datetime_format)) ) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if resolution is not None: - - _query_params.append(('resolution', resolution)) - + + _query_params.append(("resolution", resolution)) + if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/metrics', + method="GET", + resource_path="/api/workspaces/{workspace_id}/metrics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4301,24 +3823,20 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_pod_history( self, workspace_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4353,7 +3871,7 @@ async def get_pod_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( workspace_id=workspace_id, @@ -4361,35 +3879,30 @@ async def get_pod_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_pod_history_with_http_info( self, workspace_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4424,7 +3937,7 @@ async def get_pod_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( workspace_id=workspace_id, @@ -4432,35 +3945,30 @@ async def get_pod_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_pod_history_without_preload_content( self, workspace_id: StrictStr, - cluster: Annotated[Optional[StrictStr], Field(description="Cluster to query for metrics.")] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Cluster to query for metrics.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4495,7 +4003,7 @@ async def get_pod_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_pod_history_serialize( workspace_id=workspace_id, @@ -4503,19 +4011,15 @@ async def get_pod_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceHistory", + "200": "ResourceHistory", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_pod_history_serialize( self, workspace_id, @@ -4528,48 +4032,37 @@ def _get_pod_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if cluster is not None: - - _query_params.append(('cluster', cluster)) - + + _query_params.append(("cluster", cluster)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/history', + method="GET", + resource_path="/api/workspaces/{workspace_id}/history", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4579,12 +4072,9 @@ def _get_pod_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_recipe( self, @@ -4593,10 +4083,7 @@ async def get_recipe( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4630,7 +4117,7 @@ async def get_recipe( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( workspace_id=workspace_id, @@ -4638,23 +4125,19 @@ async def get_recipe( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceRecipe", + "200": "WorkspaceRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_recipe_with_http_info( self, @@ -4663,10 +4146,7 @@ async def get_recipe_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4700,7 +4180,7 @@ async def get_recipe_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( workspace_id=workspace_id, @@ -4708,23 +4188,19 @@ async def get_recipe_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceRecipe", + "200": "WorkspaceRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_recipe_without_preload_content( self, @@ -4733,10 +4209,7 @@ async def get_recipe_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4770,7 +4243,7 @@ async def get_recipe_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_recipe_serialize( workspace_id=workspace_id, @@ -4778,19 +4251,15 @@ async def get_recipe_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceRecipe", + "200": "WorkspaceRecipe", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_recipe_serialize( self, workspace_id, @@ -4803,48 +4272,37 @@ def _get_recipe_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if as_template is not None: - - _query_params.append(('as_template', as_template)) - + + _query_params.append(("as_template", as_template)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/recipe', + method="GET", + resource_path="/api/workspaces/{workspace_id}/recipe", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4854,12 +4312,9 @@ def _get_recipe_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_resource_template( self, @@ -4867,10 +4322,7 @@ async def get_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4902,30 +4354,26 @@ async def get_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_resource_template_with_http_info( self, @@ -4933,10 +4381,7 @@ async def get_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4968,30 +4413,26 @@ async def get_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_resource_template_without_preload_content( self, @@ -4999,10 +4440,7 @@ async def get_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5034,26 +4472,22 @@ async def get_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_resource_template_serialize( self, workspace_id, @@ -5065,44 +4499,33 @@ def _get_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/template', + method="GET", + resource_path="/api/workspaces/{workspace_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5112,12 +4535,9 @@ def _get_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_route( self, @@ -5126,10 +4546,7 @@ async def get_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5164,7 +4581,7 @@ async def get_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( workspace_id=workspace_id, @@ -5172,23 +4589,19 @@ async def get_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_route_with_http_info( self, @@ -5197,10 +4610,7 @@ async def get_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5235,7 +4645,7 @@ async def get_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( workspace_id=workspace_id, @@ -5243,23 +4653,19 @@ async def get_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_route_without_preload_content( self, @@ -5268,10 +4674,7 @@ async def get_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5306,7 +4709,7 @@ async def get_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_route_serialize( workspace_id=workspace_id, @@ -5314,19 +4717,15 @@ async def get_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_route_serialize( self, workspace_id, @@ -5339,46 +4738,35 @@ def _get_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if route_id is not None: - _path_params['route_id'] = route_id + _path_params["route_id"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/routes/{route_id}', + method="GET", + resource_path="/api/workspaces/{workspace_id}/routes/{route_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5388,12 +4776,9 @@ def _get_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_runtime_summary( self, @@ -5401,10 +4786,7 @@ async def get_runtime_summary( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5437,30 +4819,26 @@ async def get_runtime_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceRuntimeSummary", + "200": "WorkspaceRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_runtime_summary_with_http_info( self, @@ -5468,10 +4846,7 @@ async def get_runtime_summary_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5504,30 +4879,26 @@ async def get_runtime_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceRuntimeSummary", + "200": "WorkspaceRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_runtime_summary_without_preload_content( self, @@ -5535,10 +4906,7 @@ async def get_runtime_summary_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5571,26 +4939,22 @@ async def get_runtime_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_runtime_summary_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceRuntimeSummary", + "200": "WorkspaceRuntimeSummary", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_runtime_summary_serialize( self, workspace_id, @@ -5602,44 +4966,33 @@ def _get_runtime_summary_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/runtimesummary', + method="GET", + resource_path="/api/workspaces/{workspace_id}/runtimesummary", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5649,12 +5002,9 @@ def _get_runtime_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_secret_attachment( self, @@ -5663,10 +5013,7 @@ async def get_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5700,7 +5047,7 @@ async def get_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( workspace_id=workspace_id, @@ -5708,23 +5055,19 @@ async def get_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_secret_attachment_with_http_info( self, @@ -5733,10 +5076,7 @@ async def get_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5770,7 +5110,7 @@ async def get_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( workspace_id=workspace_id, @@ -5778,23 +5118,19 @@ async def get_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_secret_attachment_without_preload_content( self, @@ -5803,10 +5139,7 @@ async def get_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5840,7 +5173,7 @@ async def get_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_attachment_serialize( workspace_id=workspace_id, @@ -5848,19 +5181,15 @@ async def get_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_secret_attachment_serialize( self, workspace_id, @@ -5873,46 +5202,35 @@ def _get_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}', + method="GET", + resource_path="/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5922,22 +5240,16 @@ def _get_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_server_options( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5967,39 +5279,32 @@ async def get_server_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceServerInfo", + "200": "WorkspaceServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_server_options_with_http_info( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6029,39 +5334,32 @@ async def get_server_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceServerInfo", + "200": "WorkspaceServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_server_options_without_preload_content( self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6091,25 +5389,21 @@ async def get_server_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_server_options_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceServerInfo", + "200": "WorkspaceServerInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_options_serialize( self, _request_auth, @@ -6120,16 +5414,13 @@ def _get_server_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6138,24 +5429,16 @@ def _get_server_options_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/info', + method="GET", + resource_path="/api/workspaces/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6165,12 +5448,9 @@ def _get_server_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_service_account_attachment( self, @@ -6178,10 +5458,7 @@ async def get_service_account_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6213,30 +5490,26 @@ async def get_service_account_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_service_account_attachment_with_http_info( self, @@ -6244,10 +5517,7 @@ async def get_service_account_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6279,30 +5549,26 @@ async def get_service_account_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_service_account_attachment_without_preload_content( self, @@ -6310,10 +5576,7 @@ async def get_service_account_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6345,26 +5608,22 @@ async def get_service_account_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_account_attachment_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ServiceAccountAttachment", + "200": "ServiceAccountAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_service_account_attachment_serialize( self, workspace_id, @@ -6376,44 +5635,33 @@ def _get_service_account_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/service_account', + method="GET", + resource_path="/api/workspaces/{workspace_id}/service_account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6423,12 +5671,9 @@ def _get_service_account_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def get_token_info( self, @@ -6436,10 +5681,7 @@ async def get_token_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6471,30 +5713,26 @@ async def get_token_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def get_token_info_with_http_info( self, @@ -6502,10 +5740,7 @@ async def get_token_info_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6537,30 +5772,26 @@ async def get_token_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def get_token_info_without_preload_content( self, @@ -6568,10 +5799,7 @@ async def get_token_info_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6603,26 +5831,22 @@ async def get_token_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_token_info_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_token_info_serialize( self, workspace_id, @@ -6634,44 +5858,33 @@ def _get_token_info_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/token', + method="GET", + resource_path="/api/workspaces/{workspace_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6681,33 +5894,48 @@ def _get_token_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on workspace name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on workspace name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6760,7 +5988,7 @@ async def list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6777,44 +6005,58 @@ async def list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceList", + "200": "WorkspaceList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_with_http_info( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on workspace name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on workspace name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6867,7 +6109,7 @@ async def list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6884,44 +6126,58 @@ async def list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceList", + "200": "WorkspaceList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_without_preload_content( self, - owner_name: Annotated[Optional[StrictStr], Field(description="Reference owner by name.")] = None, - owner_id: Annotated[Optional[StrictStr], Field(description="Reference owner by ID.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="Reference owner by user ID.")] = None, - group_id: Annotated[Optional[StrictStr], Field(description="Reference owner by group ID.")] = None, - org_id: Annotated[Optional[StrictStr], Field(description="Reference owner by org ID.")] = None, - owner: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Reference owner by name.")] = None, - name: Annotated[Optional[StrictStr], Field(description="Substring matched search string on workspace name.")] = None, + owner_name: Annotated[ + Optional[StrictStr], Field(description="Reference owner by name.") + ] = None, + owner_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by ID.") + ] = None, + user_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by user ID.") + ] = None, + group_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by group ID.") + ] = None, + org_id: Annotated[ + Optional[StrictStr], Field(description="Reference owner by org ID.") + ] = None, + owner: Annotated[ + Optional[Annotated[str, Field(strict=True)]], + Field(description="Reference owner by name."), + ] = None, + name: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on workspace name."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6974,7 +6230,7 @@ async def list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_serialize( owner_name=owner_name, @@ -6991,19 +6247,15 @@ async def list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceList", + "200": "WorkspaceList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_serialize( self, owner_name, @@ -7025,86 +6277,75 @@ def _list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters # process the query parameters if owner_name is not None: - - _query_params.append(('owner_name', owner_name)) - + + _query_params.append(("owner_name", owner_name)) + if owner_id is not None: - - _query_params.append(('owner_id', owner_id)) - + + _query_params.append(("owner_id", owner_id)) + if user_id is not None: - - _query_params.append(('user_id', user_id)) - + + _query_params.append(("user_id", user_id)) + if group_id is not None: - - _query_params.append(('group_id', group_id)) - + + _query_params.append(("group_id", group_id)) + if org_id is not None: - - _query_params.append(('org_id', org_id)) - + + _query_params.append(("org_id", org_id)) + if owner is not None: - - _query_params.append(('owner', owner)) - + + _query_params.append(("owner", owner)) + if name is not None: - - _query_params.append(('name', name)) - + + _query_params.append(("name", name)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces', + method="GET", + resource_path="/api/workspaces", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7114,28 +6355,30 @@ def _list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_routes( self, workspace_id: StrictStr, - subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, + subdomain: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on route subdomain."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7178,7 +6421,7 @@ async def list_routes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( workspace_id=workspace_id, @@ -7190,39 +6433,40 @@ async def list_routes( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RouteList", + "200": "RouteList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_routes_with_http_info( self, workspace_id: StrictStr, - subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, + subdomain: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on route subdomain."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7265,7 +6509,7 @@ async def list_routes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( workspace_id=workspace_id, @@ -7277,39 +6521,40 @@ async def list_routes_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RouteList", + "200": "RouteList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_routes_without_preload_content( self, workspace_id: StrictStr, - subdomain: Annotated[Optional[StrictStr], Field(description="Substring matched search string on route subdomain.")] = None, + subdomain: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on route subdomain."), + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7352,7 +6597,7 @@ async def list_routes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_routes_serialize( workspace_id=workspace_id, @@ -7364,19 +6609,15 @@ async def list_routes_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RouteList", + "200": "RouteList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_routes_serialize( self, workspace_id, @@ -7393,64 +6634,53 @@ def _list_routes_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if subdomain is not None: - - _query_params.append(('subdomain', subdomain)) - + + _query_params.append(("subdomain", subdomain)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/routes', + method="GET", + resource_path="/api/workspaces/{workspace_id}/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7460,29 +6690,33 @@ def _list_routes_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_secret_attachments( self, workspace_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7526,7 +6760,7 @@ async def list_secret_attachments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( workspace_id=workspace_id, @@ -7539,40 +6773,43 @@ async def list_secret_attachments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_secret_attachments_with_http_info( self, workspace_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7616,7 +6853,7 @@ async def list_secret_attachments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( workspace_id=workspace_id, @@ -7629,40 +6866,43 @@ async def list_secret_attachments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_secret_attachments_without_preload_content( self, workspace_id: StrictStr, - location: Annotated[Optional[StrictStr], Field(description="Substring matched search string on secret attachment location.")] = None, - attachment_type: Annotated[Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.")] = None, + location: Annotated[ + Optional[StrictStr], + Field(description="Substring matched search string on secret attachment location."), + ] = None, + attachment_type: Annotated[ + Optional[SecretAttachmentType], Field(description="Filter secret attachments by type.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7706,7 +6946,7 @@ async def list_secret_attachments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secret_attachments_serialize( workspace_id=workspace_id, @@ -7719,19 +6959,15 @@ async def list_secret_attachments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachmentList", + "200": "SecretAttachmentList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_secret_attachments_serialize( self, workspace_id, @@ -7749,68 +6985,57 @@ def _list_secret_attachments_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if location is not None: - - _query_params.append(('location', location)) - + + _query_params.append(("location", location)) + if attachment_type is not None: - - _query_params.append(('attachment_type', attachment_type.value)) - + + _query_params.append(("attachment_type", attachment_type.value)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/secrets', + method="GET", + resource_path="/api/workspaces/{workspace_id}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7820,28 +7045,29 @@ def _list_secret_attachments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def list_viewers( self, workspace_id: StrictStr, - route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, + route_id: Annotated[ + Optional[StrictStr], Field(description="Filter viewers by route ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7884,7 +7110,7 @@ async def list_viewers( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( workspace_id=workspace_id, @@ -7896,39 +7122,39 @@ async def list_viewers( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewerList", + "200": "ViewerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def list_viewers_with_http_info( self, workspace_id: StrictStr, - route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, + route_id: Annotated[ + Optional[StrictStr], Field(description="Filter viewers by route ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -7971,7 +7197,7 @@ async def list_viewers_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( workspace_id=workspace_id, @@ -7983,39 +7209,39 @@ async def list_viewers_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewerList", + "200": "ViewerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def list_viewers_without_preload_content( self, workspace_id: StrictStr, - route_id: Annotated[Optional[StrictStr], Field(description="Filter viewers by route ID.")] = None, + route_id: Annotated[ + Optional[StrictStr], Field(description="Filter viewers by route ID.") + ] = None, prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Page size.")] = None, - descending: Annotated[Optional[StrictBool], Field(description="List results in descending order.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8058,7 +7284,7 @@ async def list_viewers_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_viewers_serialize( workspace_id=workspace_id, @@ -8070,19 +7296,15 @@ async def list_viewers_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewerList", + "200": "ViewerList", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_viewers_serialize( self, workspace_id, @@ -8099,64 +7321,53 @@ def _list_viewers_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters if route_id is not None: - - _query_params.append(('route_id', route_id)) - + + _query_params.append(("route_id", route_id)) + if prev_key is not None: - - _query_params.append(('prev_key', prev_key)) - + + _query_params.append(("prev_key", prev_key)) + if next_key is not None: - - _query_params.append(('next_key', next_key)) - + + _query_params.append(("next_key", next_key)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if descending is not None: - - _query_params.append(('descending', descending)) - + + _query_params.append(("descending", descending)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/workspaces/{workspace_id}/viewers', + method="GET", + resource_path="/api/workspaces/{workspace_id}/viewers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8166,12 +7377,9 @@ def _list_viewers_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def restart( self, @@ -8180,10 +7388,7 @@ async def restart( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8218,7 +7423,7 @@ async def restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( workspace_id=workspace_id, @@ -8226,23 +7431,19 @@ async def restart( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def restart_with_http_info( self, @@ -8251,10 +7452,7 @@ async def restart_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8289,7 +7487,7 @@ async def restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( workspace_id=workspace_id, @@ -8297,23 +7495,19 @@ async def restart_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def restart_without_preload_content( self, @@ -8322,10 +7516,7 @@ async def restart_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8360,7 +7551,7 @@ async def restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._restart_serialize( workspace_id=workspace_id, @@ -8368,19 +7559,15 @@ async def restart_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _restart_serialize( self, workspace_id, @@ -8393,21 +7580,18 @@ def _restart_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -8415,37 +7599,24 @@ def _restart_serialize( if workspace_start is not None: _body_params = workspace_start - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/restart', + method="POST", + resource_path="/api/workspaces/{workspace_id}/restart", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8455,12 +7626,9 @@ def _restart_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def rotate_token( self, @@ -8468,10 +7636,7 @@ async def rotate_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8504,30 +7669,26 @@ async def rotate_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def rotate_token_with_http_info( self, @@ -8535,10 +7696,7 @@ async def rotate_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8571,30 +7729,26 @@ async def rotate_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def rotate_token_without_preload_content( self, @@ -8602,10 +7756,7 @@ async def rotate_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8638,26 +7789,22 @@ async def rotate_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._rotate_token_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _rotate_token_serialize( self, workspace_id, @@ -8669,44 +7816,33 @@ def _rotate_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/token', + method="POST", + resource_path="/api/workspaces/{workspace_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8716,12 +7852,9 @@ def _rotate_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def start( self, @@ -8730,10 +7863,7 @@ async def start( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8768,7 +7898,7 @@ async def start( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( workspace_id=workspace_id, @@ -8776,23 +7906,19 @@ async def start( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def start_with_http_info( self, @@ -8801,10 +7927,7 @@ async def start_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8839,7 +7962,7 @@ async def start_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( workspace_id=workspace_id, @@ -8847,23 +7970,19 @@ async def start_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def start_without_preload_content( self, @@ -8872,10 +7991,7 @@ async def start_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -8910,7 +8026,7 @@ async def start_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._start_serialize( workspace_id=workspace_id, @@ -8918,19 +8034,15 @@ async def start_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _start_serialize( self, workspace_id, @@ -8943,21 +8055,18 @@ def _start_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -8965,37 +8074,24 @@ def _start_serialize( if workspace_start is not None: _body_params = workspace_start - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/start', + method="POST", + resource_path="/api/workspaces/{workspace_id}/start", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9005,12 +8101,9 @@ def _start_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def stop( self, @@ -9018,10 +8111,7 @@ async def stop( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9054,30 +8144,26 @@ async def stop( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def stop_with_http_info( self, @@ -9085,10 +8171,7 @@ async def stop_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9121,30 +8204,26 @@ async def stop_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def stop_without_preload_content( self, @@ -9152,10 +8231,7 @@ async def stop_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9188,26 +8264,22 @@ async def stop_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._stop_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_serialize( self, workspace_id, @@ -9219,44 +8291,33 @@ def _stop_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/workspaces/{workspace_id}/stop', + method="POST", + resource_path="/api/workspaces/{workspace_id}/stop", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9266,12 +8327,9 @@ def _stop_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update( self, @@ -9280,10 +8338,7 @@ async def update( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9318,7 +8373,7 @@ async def update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( workspace_id=workspace_id, @@ -9326,23 +8381,19 @@ async def update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_with_http_info( self, @@ -9351,10 +8402,7 @@ async def update_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9389,7 +8437,7 @@ async def update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( workspace_id=workspace_id, @@ -9397,23 +8445,19 @@ async def update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_without_preload_content( self, @@ -9422,10 +8466,7 @@ async def update_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9460,7 +8501,7 @@ async def update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_serialize( workspace_id=workspace_id, @@ -9468,19 +8509,15 @@ async def update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Workspace", + "200": "Workspace", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_serialize( self, workspace_id, @@ -9493,21 +8530,18 @@ def _update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -9515,37 +8549,24 @@ def _update_serialize( if workspace_update is not None: _body_params = workspace_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/workspaces/{workspace_id}', + method="PATCH", + resource_path="/api/workspaces/{workspace_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9555,12 +8576,9 @@ def _update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_resource_template( self, @@ -9568,10 +8586,7 @@ async def update_resource_template( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9603,30 +8618,26 @@ async def update_resource_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_resource_template_with_http_info( self, @@ -9634,10 +8645,7 @@ async def update_resource_template_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9669,30 +8677,26 @@ async def update_resource_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_resource_template_without_preload_content( self, @@ -9700,10 +8704,7 @@ async def update_resource_template_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9735,26 +8736,22 @@ async def update_resource_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_resource_template_serialize( workspace_id=workspace_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTemplate", + "200": "ResourceTemplate", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_resource_template_serialize( self, workspace_id, @@ -9766,44 +8763,33 @@ def _update_resource_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/workspaces/{workspace_id}/template', + method="PATCH", + resource_path="/api/workspaces/{workspace_id}/template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9813,12 +8799,9 @@ def _update_resource_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_route( self, @@ -9828,10 +8811,7 @@ async def update_route( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9868,7 +8848,7 @@ async def update_route( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( workspace_id=workspace_id, @@ -9877,23 +8857,19 @@ async def update_route( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_route_with_http_info( self, @@ -9903,10 +8879,7 @@ async def update_route_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -9943,7 +8916,7 @@ async def update_route_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( workspace_id=workspace_id, @@ -9952,23 +8925,19 @@ async def update_route_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_route_without_preload_content( self, @@ -9978,10 +8947,7 @@ async def update_route_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10018,7 +8984,7 @@ async def update_route_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_route_serialize( workspace_id=workspace_id, @@ -10027,19 +8993,15 @@ async def update_route_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + "200": "Route", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_route_serialize( self, workspace_id, @@ -10053,23 +9015,20 @@ def _update_route_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if route_id is not None: - _path_params['route_id'] = route_id + _path_params["route_id"] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -10077,37 +9036,24 @@ def _update_route_serialize( if route_update is not None: _body_params = route_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/workspaces/{workspace_id}/routes/{route_id}', + method="PATCH", + resource_path="/api/workspaces/{workspace_id}/routes/{route_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10117,12 +9063,9 @@ def _update_route_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_secret_attachment( self, @@ -10132,10 +9075,7 @@ async def update_secret_attachment( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10171,7 +9111,7 @@ async def update_secret_attachment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( workspace_id=workspace_id, @@ -10180,23 +9120,19 @@ async def update_secret_attachment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_secret_attachment_with_http_info( self, @@ -10206,10 +9142,7 @@ async def update_secret_attachment_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10245,7 +9178,7 @@ async def update_secret_attachment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( workspace_id=workspace_id, @@ -10254,23 +9187,19 @@ async def update_secret_attachment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_secret_attachment_without_preload_content( self, @@ -10280,10 +9209,7 @@ async def update_secret_attachment_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10319,7 +9245,7 @@ async def update_secret_attachment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_attachment_serialize( workspace_id=workspace_id, @@ -10328,19 +9254,15 @@ async def update_secret_attachment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SecretAttachment", + "200": "SecretAttachment", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_secret_attachment_serialize( self, workspace_id, @@ -10354,23 +9276,20 @@ def _update_secret_attachment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id if secret_attachment_id is not None: - _path_params['secret_attachment_id'] = secret_attachment_id + _path_params["secret_attachment_id"] = secret_attachment_id # process the query parameters # process the header parameters # process the form parameters @@ -10378,37 +9297,24 @@ def _update_secret_attachment_serialize( if secret_attachment_update is not None: _body_params = secret_attachment_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}', + method="PATCH", + resource_path="/api/workspaces/{workspace_id}/secrets/{secret_attachment_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10418,12 +9324,9 @@ def _update_secret_attachment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call async def update_token( self, @@ -10432,10 +9335,7 @@ async def update_token( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10470,7 +9370,7 @@ async def update_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( workspace_id=workspace_id, @@ -10478,23 +9378,19 @@ async def update_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call async def update_token_with_http_info( self, @@ -10503,10 +9399,7 @@ async def update_token_with_http_info( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10541,7 +9434,7 @@ async def update_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( workspace_id=workspace_id, @@ -10549,23 +9442,19 @@ async def update_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) await response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call async def update_token_without_preload_content( self, @@ -10574,10 +9463,7 @@ async def update_token_without_preload_content( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -10612,7 +9498,7 @@ async def update_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_token_serialize( workspace_id=workspace_id, @@ -10620,19 +9506,15 @@ async def update_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceTokenInfo", + "200": "ResourceTokenInfo", } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_token_serialize( self, workspace_id, @@ -10645,21 +9527,18 @@ def _update_token_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters if workspace_id is not None: - _path_params['workspace_id'] = workspace_id + _path_params["workspace_id"] = workspace_id # process the query parameters # process the header parameters # process the form parameters @@ -10667,37 +9546,24 @@ def _update_token_serialize( if resource_token_update is not None: _body_params = resource_token_update - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/workspaces/{workspace_id}/token', + method="PATCH", + resource_path="/api/workspaces/{workspace_id}/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10707,7 +9573,5 @@ def _update_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/saturn_api/api_client.py b/saturn_api/api_client.py index 51cb5a9..1a5471d 100644 --- a/saturn_api/api_client.py +++ b/saturn_api/api_client.py @@ -1,19 +1,15 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - - import datetime -from dateutil.parser import parse -from enum import Enum import decimal import json import mimetypes @@ -21,27 +17,31 @@ import re import tempfile import uuid - +from enum import Enum +from typing import Dict, List, Optional, Tuple, Union from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union + +from dateutil.parser import parse from pydantic import SecretStr -from saturn_api.configuration import Configuration -from saturn_api.api_response import ApiResponse, T as ApiResponseT import saturn_api.models from saturn_api import rest +from saturn_api.api_response import ApiResponse +from saturn_api.api_response import T as ApiResponseT +from saturn_api.configuration import Configuration from saturn_api.exceptions import ( - ApiValueError, ApiException, + ApiValueError, BadRequestException, - UnauthorizedException, ForbiddenException, NotFoundException, - ServiceException + ServiceException, + UnauthorizedException, ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + class ApiClient: """Generic API client for OpenAPI client library builds. @@ -60,25 +60,21 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'UUID': uuid.UUID, - 'object': object, + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "decimal": decimal.Decimal, + "UUID": uuid.UUID, + "object": object, } _pool = None def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None + self, configuration=None, header_name=None, header_value=None, cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -91,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.user_agent = "OpenAPI-Generator/1.0.0/python" self.client_side_validation = configuration.client_side_validation async def __aenter__(self): @@ -106,16 +102,15 @@ async def close(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - _default = None @classmethod @@ -151,12 +146,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, auth_settings=None, + files=None, + auth_settings=None, collection_formats=None, _host=None, - _request_auth=None + _request_auth=None, ) -> RequestSerialized: - """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -185,35 +180,26 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) + header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) + "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) + post_params = self.parameters_to_tuples(post_params, collection_formats) if files: post_params.extend(self.files_parameters(files)) @@ -225,7 +211,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth + request_auth=_request_auth, ) # body @@ -242,23 +228,13 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) + url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query return method, url, header_params, body, post_params - async def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None + self, method, url, header_params=None, body=None, post_params=None, _request_timeout=None ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -275,10 +251,12 @@ async def call_api( try: # perform request and return response response_data = await self.rest_client.request( - method, url, + method, + url, headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout + body=body, + post_params=post_params, + _request_timeout=_request_timeout, ) except ApiException as e: @@ -289,7 +267,7 @@ async def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None + response_types_map: Optional[Dict[str, ApiResponseT]] = None, ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -301,7 +279,11 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + if ( + not response_type + and isinstance(response_data.status, int) + and 100 <= response_data.status <= 599 + ): # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) @@ -315,7 +297,7 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.headers.get('content-type') + content_type = response_data.headers.get("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" @@ -330,10 +312,10 @@ def response_deserialize( ) return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.headers, - raw_data = response_data.data + status_code=response_data.status, + data=return_data, + headers=response_data.headers, + raw_data=response_data.data, ) def sanitize_for_serialization(self, obj): @@ -363,36 +345,28 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, uuid.UUID): return str(obj) elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): return str(obj) elif isinstance(obj, dict): - return { - key: self.sanitize_for_serialization(val) - for key, val in obj.items() - } + return {key: self.sanitize_for_serialization(val) for key, val in obj.items()} # Convert model obj to dict except # attributes `openapi_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. @@ -410,17 +384,18 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + elif re.match( + r"^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE + ): if response_text == "": data = "" else: data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) + status=0, reason="Unsupported content type: {0}".format(content_type) ) return self.__deserialize(data, response_type) @@ -437,19 +412,17 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) + if klass.startswith("List["): + m = re.match(r"List\[(.*)]", klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) + if klass.startswith("Dict["): + m = re.match(r"Dict\[([^,]*), (.*)]", klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -487,19 +460,18 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -524,20 +496,18 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, quote(str(value))) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) + delimiter = "," + new_params.append((k, delimiter.join(quote(str(value)) for value in v))) else: new_params.append((k, quote(str(v)))) @@ -555,7 +525,7 @@ def files_parameters( params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, 'rb') as f: + with open(v, "rb") as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -569,13 +539,8 @@ def files_parameters( continue else: raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -588,7 +553,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search('json', accept, re.IGNORECASE): + if re.search("json", accept, re.IGNORECASE): return accept return accepts[0] @@ -603,20 +568,13 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): + if re.search("json", content_type, re.IGNORECASE): return content_type return content_types[0] def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None + self, headers, queries, auth_settings, resource_path, method, body, request_auth=None ) -> None: """Updates header and query params based on authentication setting. @@ -634,35 +592,17 @@ def update_params_for_auth( return if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) + self._apply_auth_params(headers, queries, resource_path, method, body, request_auth) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting + headers, queries, resource_path, method, body, auth_setting ) def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting + self, headers, queries, resource_path, method, body, auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -674,17 +614,15 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") def __deserialize_file(self, response): """Deserializes body to file @@ -704,10 +642,7 @@ def __deserialize_file(self, response): content_disposition = response.headers.get("Content-Disposition") if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) assert m is not None, "Unexpected 'content-disposition' header value" filename = os.path.basename(m.group(1)) # Strip any directory traversal if filename in ("", ".", ".."): # fall back to tmp filename @@ -753,8 +688,7 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + status=0, reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -771,11 +705,7 @@ def __deserialize_datetime(self, string): return string except ValueError: raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) + status=0, reason=("Failed to parse `{0}` as datetime object".format(string)) ) def __deserialize_enum(self, data, klass): @@ -789,11 +719,7 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) + status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) ) def __deserialize_model(self, data, klass): diff --git a/saturn_api/api_response.py b/saturn_api/api_response.py index 9bc7c11..ca801da 100644 --- a/saturn_api/api_response.py +++ b/saturn_api/api_response.py @@ -1,11 +1,14 @@ """API response object.""" from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel + +from typing import Generic, Mapping, Optional, TypeVar + +from pydantic import BaseModel, Field, StrictBytes, StrictInt T = TypeVar("T") + class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -16,6 +19,4 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = { - "arbitrary_types_allowed": True - } + model_config = {"arbitrary_types_allowed": True} diff --git a/saturn_api/configuration.py b/saturn_api/configuration.py index 04d5744..a4e467a 100644 --- a/saturn_api/configuration.py +++ b/saturn_api/configuration.py @@ -1,33 +1,38 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import copy import http.client as httplib import logging -from logging import FileHandler import os import sys +from logging import FileHandler from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self import urllib3 - +from typing_extensions import NotRequired, Self JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } ServerVariablesT = Dict[str, str] @@ -173,27 +178,26 @@ class Configuration: def __init__( self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, + host: Optional[str] = None, + api_key: Optional[Dict[str, str]] = None, + api_key_prefix: Optional[Dict[str, str]] = None, + username: Optional[str] = None, + password: Optional[str] = None, + access_token: Optional[str] = None, + server_index: Optional[int] = None, + server_variables: Optional[ServerVariablesT] = None, + server_operation_index: Optional[Dict[int, int]] = None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]] = None, + ignore_operation_servers: bool = False, + ssl_ca_cert: Optional[str] = None, retries: Optional[int] = None, ca_cert_data: Optional[Union[str, bytes]] = None, - cert_file: Optional[str]=None, - key_file: Optional[str]=None, + cert_file: Optional[str] = None, + key_file: Optional[str] = None, *, debug: Optional[bool] = None, ) -> None: - """Constructor - """ + """Constructor""" if host is None: host = os.getenv("SATURN_BASE_URL", None) self._base_path = "http://localhost" if host is None else host @@ -233,7 +237,9 @@ def __init__( self.password = password """Password for HTTP basic authentication """ - self.access_token = os.getenv("SATURN_TOKEN", None) if access_token is None else access_token + self.access_token = ( + os.getenv("SATURN_TOKEN", None) if access_token is None else access_token + ) """Access token """ self.logger = {} @@ -241,7 +247,7 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("saturn_api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None @@ -297,7 +303,7 @@ def __init__( self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ self.retries = retries @@ -318,12 +324,12 @@ def __init__( """date format """ - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -455,7 +461,9 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + def get_api_key_with_prefix( + self, identifier: str, alias: Optional[str] = None + ) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -485,22 +493,20 @@ def get_basic_auth_token(self) -> Optional[str]: password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") - def auth_settings(self)-> AuthSettings: + def auth_settings(self) -> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ auth: AuthSettings = {} if self.access_token is not None: - auth['bearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["bearerAuth"] = { + "type": "bearer", + "in": "header", + "key": "Authorization", + "value": "Bearer " + self.access_token, } return auth @@ -509,12 +515,13 @@ def to_debug_report(self) -> str: :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 2026.02.01\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 2026.02.01\n" + "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) + ) def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings @@ -523,16 +530,16 @@ def get_host_settings(self) -> List[HostSetting]: """ return [ { - 'url': "", - 'description': "No description provided", + "url": "", + "description": "No description provided", } ] def get_host_from_settings( self, index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, + variables: Optional[ServerVariablesT] = None, + servers: Optional[List[HostSetting]] = None, ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings @@ -551,22 +558,22 @@ def get_host_from_settings( except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Must be less than {1}".format(index, len(servers)) + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) diff --git a/saturn_api/exceptions.py b/saturn_api/exceptions.py index c9efbdf..81747ec 100644 --- a/saturn_api/exceptions.py +++ b/saturn_api/exceptions.py @@ -1,26 +1,26 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from typing import Any, Optional + from typing_extensions import Self + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) -> None: + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -103,9 +103,9 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -124,17 +124,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode('utf-8') + self.body = http_resp.data.decode("utf-8") except Exception: pass self.headers = http_resp.headers @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -162,11 +162,9 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += "HTTP response headers: {0}\n".format(self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) @@ -199,12 +197,12 @@ class ServiceException(ApiException): class ConflictException(ApiException): """Exception for HTTP 409 Conflict.""" - pass + class UnprocessableEntityException(ApiException): """Exception for HTTP 422 Unprocessable Entity.""" - pass + def render_path(path_to_item): diff --git a/saturn_api/models/__init__.py b/saturn_api/models/__init__.py index 74a8e9f..b4deffa 100644 --- a/saturn_api/models/__init__.py +++ b/saturn_api/models/__init__.py @@ -2,14 +2,14 @@ # flake8: noqa """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 # import models into model package @@ -22,6 +22,12 @@ from saturn_api.models.api_token_list import ApiTokenList from saturn_api.models.api_token_update import ApiTokenUpdate from saturn_api.models.app_info import AppInfo +from saturn_api.models.artifact import Artifact +from saturn_api.models.artifact_create import ArtifactCreate +from saturn_api.models.artifact_kind import ArtifactKind +from saturn_api.models.artifact_list import ArtifactList +from saturn_api.models.artifact_status import ArtifactStatus +from saturn_api.models.artifact_update import ArtifactUpdate from saturn_api.models.auth0_info import Auth0Info from saturn_api.models.authorization_code_grant import AuthorizationCodeGrant from saturn_api.models.authorization_grant import AuthorizationGrant @@ -35,6 +41,7 @@ from saturn_api.models.cluster_update import ClusterUpdate from saturn_api.models.concurrency_policy import ConcurrencyPolicy from saturn_api.models.condition import Condition +from saturn_api.models.config_file_entry import ConfigFileEntry from saturn_api.models.container_runtime_summary import ContainerRuntimeSummary from saturn_api.models.container_status import ContainerStatus from saturn_api.models.cron_schedule import CronSchedule @@ -45,7 +52,9 @@ from saturn_api.models.dask_cluster import DaskCluster from saturn_api.models.dask_cluster_adapt import DaskClusterAdapt from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment -from saturn_api.models.dask_cluster_attachment_scheduler import DaskClusterAttachmentScheduler +from saturn_api.models.dask_cluster_attachment_scheduler import ( + DaskClusterAttachmentScheduler, +) from saturn_api.models.dask_cluster_attachment_worker import DaskClusterAttachmentWorker from saturn_api.models.dask_cluster_create import DaskClusterCreate from saturn_api.models.dask_cluster_list import DaskClusterList @@ -55,9 +64,14 @@ from saturn_api.models.dask_cluster_server_options import DaskClusterServerOptions from saturn_api.models.dask_cluster_update import DaskClusterUpdate from saturn_api.models.dask_components import DaskComponents -from saturn_api.models.dask_worker_runtime_summary_list import DaskWorkerRuntimeSummaryList +from saturn_api.models.dask_worker_runtime_summary_list import ( + DaskWorkerRuntimeSummaryList, +) from saturn_api.models.dask_worker_summary import DaskWorkerSummary from saturn_api.models.data_point import DataPoint +from saturn_api.models.dataset import Dataset +from saturn_api.models.dataset_create import DatasetCreate +from saturn_api.models.dataset_list import DatasetList from saturn_api.models.default_images import DefaultImages from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.deployment import Deployment @@ -73,11 +87,19 @@ from saturn_api.models.deployment_update import DeploymentUpdate from saturn_api.models.external_repo import ExternalRepo from saturn_api.models.external_repo_attachment import ExternalRepoAttachment -from saturn_api.models.external_repo_attachment_create import ExternalRepoAttachmentCreate +from saturn_api.models.external_repo_attachment_create import ( + ExternalRepoAttachmentCreate, +) from saturn_api.models.external_repo_attachment_list import ExternalRepoAttachmentList -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested -from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe -from saturn_api.models.external_repo_attachment_update import ExternalRepoAttachmentUpdate +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) +from saturn_api.models.external_repo_attachment_recipe import ( + ExternalRepoAttachmentRecipe, +) +from saturn_api.models.external_repo_attachment_update import ( + ExternalRepoAttachmentUpdate, +) from saturn_api.models.external_repo_create import ExternalRepoCreate from saturn_api.models.external_repo_list import ExternalRepoList from saturn_api.models.external_repo_update import ExternalRepoUpdate @@ -86,6 +108,9 @@ from saturn_api.models.extra_packages_recipe_apt import ExtraPackagesRecipeApt from saturn_api.models.extra_packages_recipe_conda import ExtraPackagesRecipeConda from saturn_api.models.extra_packages_recipe_pip import ExtraPackagesRecipePip +from saturn_api.models.fine_tune_job_create import FineTuneJobCreate +from saturn_api.models.fine_tune_job_list import FineTuneJobList +from saturn_api.models.fine_tune_job_view import FineTuneJobView from saturn_api.models.group import Group from saturn_api.models.group_create import GroupCreate from saturn_api.models.group_list import GroupList @@ -96,6 +121,8 @@ from saturn_api.models.hardware_type import HardwareType from saturn_api.models.historic_log import HistoricLog from saturn_api.models.historic_log_list import HistoricLogList +from saturn_api.models.hyperparameters import Hyperparameters +from saturn_api.models.hyperparameters1 import Hyperparameters1 from saturn_api.models.identity import Identity from saturn_api.models.identity_by_group_id import IdentityByGroupId from saturn_api.models.identity_by_user_id import IdentityByUserId @@ -149,23 +176,35 @@ from saturn_api.models.notification_list import NotificationList from saturn_api.models.notification_subscribe import NotificationSubscribe from saturn_api.models.notification_subscription import NotificationSubscription -from saturn_api.models.notification_subscription_list import NotificationSubscriptionList +from saturn_api.models.notification_subscription_list import ( + NotificationSubscriptionList, +) from saturn_api.models.notification_unsubscribe import NotificationUnsubscribe -from saturn_api.models.object_storage_bulk_delete_results import ObjectStorageBulkDeleteResults +from saturn_api.models.object_storage_bulk_delete_results import ( + ObjectStorageBulkDeleteResults, +) from saturn_api.models.object_storage_bulk_download import ObjectStorageBulkDownload from saturn_api.models.object_storage_bulk_reference import ObjectStorageBulkReference from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart -from saturn_api.models.object_storage_completed_upload import ObjectStorageCompletedUpload +from saturn_api.models.object_storage_completed_upload import ( + ObjectStorageCompletedUpload, +) from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource from saturn_api.models.object_storage_dir_details import ObjectStorageDirDetails from saturn_api.models.object_storage_file_details import ObjectStorageFileDetails from saturn_api.models.object_storage_list import ObjectStorageList -from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload +from saturn_api.models.object_storage_presigned_download import ( + ObjectStoragePresignedDownload, +) from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart -from saturn_api.models.object_storage_presigned_upload import ObjectStoragePresignedUpload +from saturn_api.models.object_storage_presigned_upload import ( + ObjectStoragePresignedUpload, +) from saturn_api.models.object_storage_reference import ObjectStorageReference from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner -from saturn_api.models.object_storage_shared_owner_list import ObjectStorageSharedOwnerList +from saturn_api.models.object_storage_shared_owner_list import ( + ObjectStorageSharedOwnerList, +) from saturn_api.models.object_storage_upload import ObjectStorageUpload from saturn_api.models.object_storage_upload_create import ObjectStorageUploadCreate from saturn_api.models.object_storage_upload_list import ObjectStorageUploadList @@ -223,15 +262,6 @@ from saturn_api.models.route_reference import RouteReference from saturn_api.models.route_state import RouteState from saturn_api.models.route_update import RouteUpdate -from saturn_api.models.ssh_private_key import SSHPrivateKey -from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate -from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList -from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial -from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate -from saturn_api.models.ssh_public_key import SSHPublicKey -from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate -from saturn_api.models.ssh_public_key_list import SSHPublicKeyList -from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate from saturn_api.models.secret import Secret from saturn_api.models.secret_access_level import SecretAccessLevel from saturn_api.models.secret_attachment import SecretAttachment @@ -248,23 +278,44 @@ from saturn_api.models.service_account import ServiceAccount from saturn_api.models.service_account_attachment import ServiceAccountAttachment from saturn_api.models.service_account_create import ServiceAccountCreate -from saturn_api.models.service_account_create_attachment import ServiceAccountCreateAttachment +from saturn_api.models.service_account_create_attachment import ( + ServiceAccountCreateAttachment, +) from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement -from saturn_api.models.service_account_entitlement_create import ServiceAccountEntitlementCreate -from saturn_api.models.service_account_entitlement_list import ServiceAccountEntitlementList +from saturn_api.models.service_account_entitlement_create import ( + ServiceAccountEntitlementCreate, +) +from saturn_api.models.service_account_entitlement_list import ( + ServiceAccountEntitlementList, +) from saturn_api.models.service_account_list import ServiceAccountList from saturn_api.models.service_account_update import ServiceAccountUpdate from saturn_api.models.shared_access_mode import SharedAccessMode from saturn_api.models.shared_folder import SharedFolder from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel from saturn_api.models.shared_folder_attachment import SharedFolderAttachment -from saturn_api.models.shared_folder_attachment_create import SharedFolderAttachmentCreate +from saturn_api.models.shared_folder_attachment_create import ( + SharedFolderAttachmentCreate, +) from saturn_api.models.shared_folder_attachment_list import SharedFolderAttachmentList -from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe -from saturn_api.models.shared_folder_attachment_update import SharedFolderAttachmentUpdate +from saturn_api.models.shared_folder_attachment_recipe import ( + SharedFolderAttachmentRecipe, +) +from saturn_api.models.shared_folder_attachment_update import ( + SharedFolderAttachmentUpdate, +) from saturn_api.models.shared_folder_create import SharedFolderCreate from saturn_api.models.shared_folder_list import SharedFolderList from saturn_api.models.shared_folder_update import SharedFolderUpdate +from saturn_api.models.ssh_private_key import SSHPrivateKey +from saturn_api.models.ssh_private_key_create import SSHPrivateKeyCreate +from saturn_api.models.ssh_private_key_list import SSHPrivateKeyList +from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial +from saturn_api.models.ssh_private_key_update import SSHPrivateKeyUpdate +from saturn_api.models.ssh_public_key import SSHPublicKey +from saturn_api.models.ssh_public_key_create import SSHPublicKeyCreate +from saturn_api.models.ssh_public_key_list import SSHPublicKeyList +from saturn_api.models.ssh_public_key_update import SSHPublicKeyUpdate from saturn_api.models.stats import Stats from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.usage_limits_create import UsageLimitsCreate @@ -300,4 +351,3 @@ from saturn_api.models.workspace_spec import WorkspaceSpec from saturn_api.models.workspace_start import WorkspaceStart from saturn_api.models.workspace_update import WorkspaceUpdate - diff --git a/saturn_api/models/active_resource_list.py b/saturn_api/models/active_resource_list.py index c64b83c..bdaa75e 100644 --- a/saturn_api/models/active_resource_list.py +++ b/saturn_api/models/active_resource_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.resource import Resource -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.resource import Resource + + class ActiveResourceList(BaseModel): """ ActiveResourceList - """ # noqa: E501 + """ # noqa: E501 + resources: List[Resource] = Field(description="List of resources that are currently active.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ActiveResourceList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "resources", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "resources", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_resources in self.resources: if _item_resources: _items.append(_item_resources.to_dict()) - _dict['resources'] = _items + _dict["resources"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "resources": [Resource.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "resources": ( + [Resource.from_dict(_item) for _item in obj["resources"]] + if obj.get("resources") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/aggregated_usage.py b/saturn_api/models/aggregated_usage.py index ab78662..5cc60eb 100644 --- a/saturn_api/models/aggregated_usage.py +++ b/saturn_api/models/aggregated_usage.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union -from typing import Literal, Optional, Set from typing_extensions import Self + class AggregatedUsage(BaseModel): """ AggregatedUsage - """ # noqa: E501 + """ # noqa: E501 + hours: Union[StrictFloat, StrictInt] = Field(description="Compute hours used.") dollars: Union[StrictFloat, StrictInt] = Field(description="Dollars spent.") __properties: ClassVar[List[str]] = ["hours", "dollars"] @@ -36,7 +37,6 @@ class AggregatedUsage(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hours": obj.get("hours"), - "dollars": obj.get("dollars") - }) + _obj = cls.model_validate({"hours": obj.get("hours"), "dollars": obj.get("dollars")}) return _obj - - diff --git a/saturn_api/models/api_status.py b/saturn_api/models/api_status.py index d59a4f1..b42688e 100644 --- a/saturn_api/models/api_status.py +++ b/saturn_api/models/api_status.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ApiStatus(BaseModel): """ ApiStatus - """ # noqa: E501 + """ # noqa: E501 + status: StrictStr = Field(description="API availability.") version: StrictStr = Field(description="API version.") __properties: ClassVar[List[str]] = ["status", "version"] @@ -36,7 +37,6 @@ class ApiStatus(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,10 +63,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "status", - "version", - ]) + excluded_fields: Set[str] = set( + [ + "status", + "version", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +86,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "status": obj.get("status"), - "version": obj.get("version") - }) + _obj = cls.model_validate({"status": obj.get("status"), "version": obj.get("version")}) return _obj - - diff --git a/saturn_api/models/api_token.py b/saturn_api/models/api_token.py index 0aa3414..b910e96 100644 --- a/saturn_api/models/api_token.py +++ b/saturn_api/models/api_token.py @@ -1,43 +1,57 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ApiToken(BaseModel): """ ApiToken - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the token.") description: StrictStr = Field(description="Description of what the API token is used for.") created_at: datetime = Field(description="Timestamp from when the token was created.") expires_at: Optional[datetime] = Field(description="Token expiration timestamp.") - refresh_expires_at: Optional[datetime] = Field(description="Refresh token expiration timestamp.") + refresh_expires_at: Optional[datetime] = Field( + description="Refresh token expiration timestamp." + ) scope: Optional[StrictStr] = Field(description="Permission scope of the token.") user_id: Optional[StrictStr] = Field(description="User ID associated with the token.") group_id: Optional[StrictStr] = Field(description="Group ID associated with the token.") access_token: StrictStr = Field(description="API access token.") refresh_token: Optional[StrictStr] = Field(default=None, description="API refresh token.") - __properties: ClassVar[List[str]] = ["id", "description", "created_at", "expires_at", "refresh_expires_at", "scope", "user_id", "group_id", "access_token", "refresh_token"] + __properties: ClassVar[List[str]] = [ + "id", + "description", + "created_at", + "expires_at", + "refresh_expires_at", + "scope", + "user_id", + "group_id", + "access_token", + "refresh_token", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +59,6 @@ class ApiToken(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,18 +93,20 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "description", - "created_at", - "expires_at", - "refresh_expires_at", - "scope", - "user_id", - "group_id", - "access_token", - "refresh_token", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "description", + "created_at", + "expires_at", + "refresh_expires_at", + "scope", + "user_id", + "group_id", + "access_token", + "refresh_token", + ] + ) _dict = self.model_dump( by_alias=True, @@ -101,32 +116,32 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None + _dict["expires_at"] = None # set to None if refresh_expires_at (nullable) is None # and model_fields_set contains the field if self.refresh_expires_at is None and "refresh_expires_at" in self.model_fields_set: - _dict['refresh_expires_at'] = None + _dict["refresh_expires_at"] = None # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict['scope'] = None + _dict["scope"] = None # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict['user_id'] = None + _dict["user_id"] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict['group_id'] = None + _dict["group_id"] = None # set to None if refresh_token (nullable) is None # and model_fields_set contains the field if self.refresh_token is None and "refresh_token" in self.model_fields_set: - _dict['refresh_token'] = None + _dict["refresh_token"] = None return _dict @@ -139,18 +154,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "refresh_expires_at": obj.get("refresh_expires_at"), - "scope": obj.get("scope"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "access_token": obj.get("access_token"), - "refresh_token": obj.get("refresh_token") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "refresh_expires_at": obj.get("refresh_expires_at"), + "scope": obj.get("scope"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "access_token": obj.get("access_token"), + "refresh_token": obj.get("refresh_token"), + } + ) return _obj - - diff --git a/saturn_api/models/api_token_create.py b/saturn_api/models/api_token_create.py index ef451ee..a8b2639 100644 --- a/saturn_api/models/api_token_create.py +++ b/saturn_api/models/api_token_create.py @@ -1,39 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.identity_reference import IdentityReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class ApiTokenCreate(BaseModel): """ ApiTokenCreate - """ # noqa: E501 - identity: Optional[IdentityReference] = Field(default=None, description="Reference to a user or group.") - description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default='', description="Description of what the API token is used for.") - expires_in: Optional[StrictInt] = Field(default=None, description="Expiration of the token in seconds.") - refresh_expires_in: Optional[StrictInt] = Field(default=None, description="Expiration of the refresh token in seconds.") + """ # noqa: E501 + + identity: Optional[IdentityReference] = Field( + default=None, description="Reference to a user or group." + ) + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default="", description="Description of what the API token is used for." + ) + expires_in: Optional[StrictInt] = Field( + default=None, description="Expiration of the token in seconds." + ) + refresh_expires_in: Optional[StrictInt] = Field( + default=None, description="Expiration of the refresh token in seconds." + ) scope: Optional[StrictStr] = Field(default=None, description="Permission scope of the token.") - __properties: ClassVar[List[str]] = ["identity", "description", "expires_in", "refresh_expires_in", "scope"] + __properties: ClassVar[List[str]] = [ + "identity", + "description", + "expires_in", + "refresh_expires_in", + "scope", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +56,6 @@ class ApiTokenCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,21 +89,21 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() # set to None if expires_in (nullable) is None # and model_fields_set contains the field if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict['expires_in'] = None + _dict["expires_in"] = None # set to None if refresh_expires_in (nullable) is None # and model_fields_set contains the field if self.refresh_expires_in is None and "refresh_expires_in" in self.model_fields_set: - _dict['refresh_expires_in'] = None + _dict["refresh_expires_in"] = None # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict['scope'] = None + _dict["scope"] = None return _dict @@ -103,13 +116,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "description": obj.get("description") if obj.get("description") is not None else '', - "expires_in": obj.get("expires_in"), - "refresh_expires_in": obj.get("refresh_expires_in"), - "scope": obj.get("scope") - }) + _obj = cls.model_validate( + { + "identity": ( + IdentityReference.from_dict(obj["identity"]) + if obj.get("identity") is not None + else None + ), + "description": obj.get("description") if obj.get("description") is not None else "", + "expires_in": obj.get("expires_in"), + "refresh_expires_in": obj.get("refresh_expires_in"), + "scope": obj.get("scope"), + } + ) return _obj - - diff --git a/saturn_api/models/api_token_info.py b/saturn_api/models/api_token_info.py index 24e3600..579efd0 100644 --- a/saturn_api/models/api_token_info.py +++ b/saturn_api/models/api_token_info.py @@ -1,41 +1,53 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ApiTokenInfo(BaseModel): """ ApiTokenInfo - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the token.") description: StrictStr = Field(description="Description of what the API token is used for.") created_at: datetime = Field(description="Timestamp from when the token was created.") expires_at: Optional[datetime] = Field(description="Token expiration timestamp.") - refresh_expires_at: Optional[datetime] = Field(description="Refresh token expiration timestamp.") + refresh_expires_at: Optional[datetime] = Field( + description="Refresh token expiration timestamp." + ) scope: Optional[StrictStr] = Field(description="Permission scope of the token.") user_id: Optional[StrictStr] = Field(description="User ID associated with the token.") group_id: Optional[StrictStr] = Field(description="Group ID associated with the token.") - __properties: ClassVar[List[str]] = ["id", "description", "created_at", "expires_at", "refresh_expires_at", "scope", "user_id", "group_id"] + __properties: ClassVar[List[str]] = [ + "id", + "description", + "created_at", + "expires_at", + "refresh_expires_at", + "scope", + "user_id", + "group_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +55,6 @@ class ApiTokenInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,16 +87,18 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "description", - "created_at", - "expires_at", - "refresh_expires_at", - "scope", - "user_id", - "group_id", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "description", + "created_at", + "expires_at", + "refresh_expires_at", + "scope", + "user_id", + "group_id", + ] + ) _dict = self.model_dump( by_alias=True, @@ -95,27 +108,27 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None + _dict["expires_at"] = None # set to None if refresh_expires_at (nullable) is None # and model_fields_set contains the field if self.refresh_expires_at is None and "refresh_expires_at" in self.model_fields_set: - _dict['refresh_expires_at'] = None + _dict["refresh_expires_at"] = None # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict['scope'] = None + _dict["scope"] = None # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict['user_id'] = None + _dict["user_id"] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict['group_id'] = None + _dict["group_id"] = None return _dict @@ -128,16 +141,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "refresh_expires_at": obj.get("refresh_expires_at"), - "scope": obj.get("scope"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "refresh_expires_at": obj.get("refresh_expires_at"), + "scope": obj.get("scope"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + } + ) return _obj - - diff --git a/saturn_api/models/api_token_list.py b/saturn_api/models/api_token_list.py index c81cd29..7aa360a 100644 --- a/saturn_api/models/api_token_list.py +++ b/saturn_api/models/api_token_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.api_token_info import ApiTokenInfo -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.api_token_info import ApiTokenInfo + + class ApiTokenList(BaseModel): """ ApiTokenList - """ # noqa: E501 + """ # noqa: E501 + tokens: List[ApiTokenInfo] = Field(description="List of API token info.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ApiTokenList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "tokens", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "tokens", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_tokens in self.tokens: if _item_tokens: _items.append(_item_tokens.to_dict()) - _dict['tokens'] = _items + _dict["tokens"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "tokens": [ApiTokenInfo.from_dict(_item) for _item in obj["tokens"]] if obj.get("tokens") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "tokens": ( + [ApiTokenInfo.from_dict(_item) for _item in obj["tokens"]] + if obj.get("tokens") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/api_token_update.py b/saturn_api/models/api_token_update.py index 12da24e..f4df5df 100644 --- a/saturn_api/models/api_token_update.py +++ b/saturn_api/models/api_token_update.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class ApiTokenUpdate(BaseModel): """ ApiTokenUpdate - """ # noqa: E501 - description: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Description of what the API token is used for.") + """ # noqa: E501 + + description: Annotated[str, Field(strict=True, max_length=255)] = Field( + description="Description of what the API token is used for." + ) __properties: ClassVar[List[str]] = ["description"] model_config = ConfigDict( @@ -36,7 +38,6 @@ class ApiTokenUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "description": obj.get("description") - }) + _obj = cls.model_validate({"description": obj.get("description")}) return _obj - - diff --git a/saturn_api/models/app_info.py b/saturn_api/models/app_info.py index 5f5e900..57dda3c 100644 --- a/saturn_api/models/app_info.py +++ b/saturn_api/models/app_info.py @@ -1,53 +1,91 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.auth0_info import Auth0Info from saturn_api.models.white_label_configuration import WhiteLabelConfiguration -from typing import Literal, Optional, Set -from typing_extensions import Self + class AppInfo(BaseModel): """ AppInfo - """ # noqa: E501 + """ # noqa: E501 + cloud_provider: StrictStr = Field(description="Name of the primary cloud provider.") is_multicluster: StrictBool = Field(description="True if installation spans multiple clusters.") - allow_deployment_public_access: StrictBool = Field(description="True if unauthenticated deployment access is allowed.") + allow_deployment_public_access: StrictBool = Field( + description="True if unauthenticated deployment access is allowed." + ) is_enterprise: StrictBool = Field(description="True if installation is Enterprise.") customer_name: StrictStr = Field(description="Name of the customer installation.") - stripe_public_key: Optional[StrictStr] = Field(description="Public key for billing in non-enterprise installations.") + stripe_public_key: Optional[StrictStr] = Field( + description="Public key for billing in non-enterprise installations." + ) hotjar_user_tracking: StrictBool = Field(description="True if hotjar is enabled.") version: StrictStr = Field(description="Version of the API.") auth0: Auth0Info = Field(description="Configuration for auth0 authentication.") - network_filesystem_enabled: StrictBool = Field(description="True if NFS shared folders are enabled.") - git_repo_clone_dir: StrictStr = Field(description="Default directory to clone git repositories into.") - app_serving_domain: StrictStr = Field(description="Root domain for deployment and workspace URLs.") + network_filesystem_enabled: StrictBool = Field( + description="True if NFS shared folders are enabled." + ) + git_repo_clone_dir: StrictStr = Field( + description="Default directory to clone git repositories into." + ) + app_serving_domain: StrictStr = Field( + description="Root domain for deployment and workspace URLs." + ) dind_enabled: StrictBool = Field(description="True if docker-in-docker is enabled.") - apply_requires_confirm: StrictBool = Field(description="True if recipe apply should be confirmed.") + apply_requires_confirm: StrictBool = Field( + description="True if recipe apply should be confirmed." + ) hide_invitations: StrictBool = Field(description="True if invitations are hidden in frontend.") populate_examples: StrictBool = Field(description="True if saturn examples are included.") - whitelabel: WhiteLabelConfiguration = Field(description="Configuration for whitelabeled installations.") - hide_resource_creation_bar: StrictBool = Field(description="True if resource creation bar should be hidden.") + whitelabel: WhiteLabelConfiguration = Field( + description="Configuration for whitelabeled installations." + ) + hide_resource_creation_bar: StrictBool = Field( + description="True if resource creation bar should be hidden." + ) user_tracking: StrictBool = Field(description="True if intercomm tracking is enabled.") - __properties: ClassVar[List[str]] = ["cloud_provider", "is_multicluster", "allow_deployment_public_access", "is_enterprise", "customer_name", "stripe_public_key", "hotjar_user_tracking", "version", "auth0", "network_filesystem_enabled", "git_repo_clone_dir", "app_serving_domain", "dind_enabled", "apply_requires_confirm", "hide_invitations", "populate_examples", "whitelabel", "hide_resource_creation_bar", "user_tracking"] + __properties: ClassVar[List[str]] = [ + "cloud_provider", + "is_multicluster", + "allow_deployment_public_access", + "is_enterprise", + "customer_name", + "stripe_public_key", + "hotjar_user_tracking", + "version", + "auth0", + "network_filesystem_enabled", + "git_repo_clone_dir", + "app_serving_domain", + "dind_enabled", + "apply_requires_confirm", + "hide_invitations", + "populate_examples", + "whitelabel", + "hide_resource_creation_bar", + "user_tracking", + ] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +93,6 @@ class AppInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,8 +117,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -90,14 +126,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of auth0 if self.auth0: - _dict['auth0'] = self.auth0.to_dict() + _dict["auth0"] = self.auth0.to_dict() # override the default output from pydantic by calling `to_dict()` of whitelabel if self.whitelabel: - _dict['whitelabel'] = self.whitelabel.to_dict() + _dict["whitelabel"] = self.whitelabel.to_dict() # set to None if stripe_public_key (nullable) is None # and model_fields_set contains the field if self.stripe_public_key is None and "stripe_public_key" in self.model_fields_set: - _dict['stripe_public_key'] = None + _dict["stripe_public_key"] = None return _dict @@ -110,27 +146,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "cloud_provider": obj.get("cloud_provider"), - "is_multicluster": obj.get("is_multicluster"), - "allow_deployment_public_access": obj.get("allow_deployment_public_access"), - "is_enterprise": obj.get("is_enterprise"), - "customer_name": obj.get("customer_name"), - "stripe_public_key": obj.get("stripe_public_key"), - "hotjar_user_tracking": obj.get("hotjar_user_tracking"), - "version": obj.get("version"), - "auth0": Auth0Info.from_dict(obj["auth0"]) if obj.get("auth0") is not None else None, - "network_filesystem_enabled": obj.get("network_filesystem_enabled"), - "git_repo_clone_dir": obj.get("git_repo_clone_dir"), - "app_serving_domain": obj.get("app_serving_domain"), - "dind_enabled": obj.get("dind_enabled"), - "apply_requires_confirm": obj.get("apply_requires_confirm"), - "hide_invitations": obj.get("hide_invitations"), - "populate_examples": obj.get("populate_examples"), - "whitelabel": WhiteLabelConfiguration.from_dict(obj["whitelabel"]) if obj.get("whitelabel") is not None else None, - "hide_resource_creation_bar": obj.get("hide_resource_creation_bar"), - "user_tracking": obj.get("user_tracking") - }) + _obj = cls.model_validate( + { + "cloud_provider": obj.get("cloud_provider"), + "is_multicluster": obj.get("is_multicluster"), + "allow_deployment_public_access": obj.get("allow_deployment_public_access"), + "is_enterprise": obj.get("is_enterprise"), + "customer_name": obj.get("customer_name"), + "stripe_public_key": obj.get("stripe_public_key"), + "hotjar_user_tracking": obj.get("hotjar_user_tracking"), + "version": obj.get("version"), + "auth0": ( + Auth0Info.from_dict(obj["auth0"]) if obj.get("auth0") is not None else None + ), + "network_filesystem_enabled": obj.get("network_filesystem_enabled"), + "git_repo_clone_dir": obj.get("git_repo_clone_dir"), + "app_serving_domain": obj.get("app_serving_domain"), + "dind_enabled": obj.get("dind_enabled"), + "apply_requires_confirm": obj.get("apply_requires_confirm"), + "hide_invitations": obj.get("hide_invitations"), + "populate_examples": obj.get("populate_examples"), + "whitelabel": ( + WhiteLabelConfiguration.from_dict(obj["whitelabel"]) + if obj.get("whitelabel") is not None + else None + ), + "hide_resource_creation_bar": obj.get("hide_resource_creation_bar"), + "user_tracking": obj.get("user_tracking"), + } + ) return _obj - - diff --git a/saturn_api/models/artifact.py b/saturn_api/models/artifact.py new file mode 100644 index 0000000..c9cea54 --- /dev/null +++ b/saturn_api/models/artifact.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.artifact_kind import ArtifactKind +from saturn_api.models.artifact_status import ArtifactStatus + + +class Artifact(BaseModel): + """ + Artifact + """ # noqa: E501 + + id: StrictStr = Field(description="Artifact identifier.") + org_id: StrictStr = Field(description="Owning organisation ID.") + name: StrictStr = Field(description="Human-readable artifact name.") + kind: ArtifactKind + location: StrictStr = Field(description="Storage location (NFS path or object storage URI).") + producer: Optional[Dict[str, Any]] = Field( + description="JSONB snapshot of the producer resource: {id, kind, name}. Null if artifact was uploaded directly." + ) + metadata: Optional[Dict[str, Any]] = Field(description="Arbitrary metadata blob.") + created_at: StrictStr = Field(description="Creation timestamp (UTC).") + status: ArtifactStatus + __properties: ClassVar[List[str]] = [ + "id", + "org_id", + "name", + "kind", + "location", + "producer", + "metadata", + "created_at", + "status", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Artifact from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "id", + "org_id", + "name", + "location", + "producer", + "metadata", + "created_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if producer (nullable) is None + # and model_fields_set contains the field + if self.producer is None and "producer" in self.model_fields_set: + _dict["producer"] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Artifact from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "name": obj.get("name"), + "kind": obj.get("kind"), + "location": obj.get("location"), + "producer": obj.get("producer"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at"), + "status": obj.get("status"), + } + ) + return _obj diff --git a/saturn_api/models/artifact_create.py b/saturn_api/models/artifact_create.py new file mode 100644 index 0000000..887c763 --- /dev/null +++ b/saturn_api/models/artifact_create.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + +from saturn_api.models.artifact_kind import ArtifactKind +from saturn_api.models.artifact_status import ArtifactStatus + + +class ArtifactCreate(BaseModel): + """ + ArtifactCreate + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Human-readable name for the artifact." + ) + kind: Optional[ArtifactKind] = None + location: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Storage location (NFS path or object storage URI)." + ) + status: Optional[ArtifactStatus] = None + producer: Optional[Dict[str, Any]] = Field( + default=None, + description="JSONB snapshot of the Saturn resource that produced this artifact. Shape: {id, kind, name}. Null if uploaded directly.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Arbitrary metadata blob: schema_type, row_count, base_model, epoch, metrics, etc.", + ) + __properties: ClassVar[List[str]] = [ + "name", + "kind", + "location", + "status", + "producer", + "metadata", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if producer (nullable) is None + # and model_fields_set contains the field + if self.producer is None and "producer" in self.model_fields_set: + _dict["producer"] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "kind": obj.get("kind"), + "location": obj.get("location"), + "status": obj.get("status"), + "producer": obj.get("producer"), + "metadata": obj.get("metadata"), + } + ) + return _obj diff --git a/saturn_api/models/artifact_kind.py b/saturn_api/models/artifact_kind.py new file mode 100644 index 0000000..2774150 --- /dev/null +++ b/saturn_api/models/artifact_kind.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class ArtifactKind(str, Enum): + """ + ArtifactKind + """ + + """ + allowed enum values + """ + DATASET = "dataset" + CHECKPOINT = "checkpoint" + MODEL_MINUS_WEIGHTS = "model-weights" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ArtifactKind from a JSON string""" + return cls(json.loads(json_str)) diff --git a/saturn_api/models/artifact_list.py b/saturn_api/models/artifact_list.py new file mode 100644 index 0000000..acd1245 --- /dev/null +++ b/saturn_api/models/artifact_list.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.artifact import Artifact + + +class ArtifactList(BaseModel): + """ + ArtifactList + """ # noqa: E501 + + artifacts: List[Artifact] = Field(description="List of artifacts.") + prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") + next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") + __properties: ClassVar[List[str]] = ["artifacts", "prev_key", "next_key"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "artifacts", + "prev_key", + "next_key", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in artifacts (list) + _items = [] + if self.artifacts: + for _item_artifacts in self.artifacts: + if _item_artifacts: + _items.append(_item_artifacts.to_dict()) + _dict["artifacts"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "artifacts": ( + [Artifact.from_dict(_item) for _item in obj["artifacts"]] + if obj.get("artifacts") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) + return _obj diff --git a/saturn_api/models/artifact_status.py b/saturn_api/models/artifact_status.py new file mode 100644 index 0000000..2178121 --- /dev/null +++ b/saturn_api/models/artifact_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class ArtifactStatus(str, Enum): + """ + ArtifactStatus + """ + + """ + allowed enum values + """ + ASSEMBLING = "assembling" + PENDING = "pending" + READY = "ready" + ERROR = "error" + DELETED = "deleted" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ArtifactStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/saturn_api/models/artifact_update.py b/saturn_api/models/artifact_update.py new file mode 100644 index 0000000..1aea28c --- /dev/null +++ b/saturn_api/models/artifact_update.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from saturn_api.models.artifact_status import ArtifactStatus + + +class ArtifactUpdate(BaseModel): + """ + ArtifactUpdate + """ # noqa: E501 + + status: Optional[ArtifactStatus] = None + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Updated metadata blob.") + __properties: ClassVar[List[str]] = ["status", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"status": obj.get("status"), "metadata": obj.get("metadata")}) + return _obj diff --git a/saturn_api/models/auth0_info.py b/saturn_api/models/auth0_info.py index 77ef168..b9fb21c 100644 --- a/saturn_api/models/auth0_info.py +++ b/saturn_api/models/auth0_info.py @@ -1,34 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class Auth0Info(BaseModel): """ Auth0Info - """ # noqa: E501 + """ # noqa: E501 + enabled: StrictBool = Field(description="True if auth0 authentication is enabled.") connections: Dict[str, StrictStr] = Field(description="Enabled auth providers.") - disable_native_login: StrictBool = Field(description="True if native username/password login is disabled.") + disable_native_login: StrictBool = Field( + description="True if native username/password login is disabled." + ) __properties: ClassVar[List[str]] = ["enabled", "connections", "disable_native_login"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class Auth0Info(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "enabled": obj.get("enabled"), - "connections": obj.get("connections"), - "disable_native_login": obj.get("disable_native_login") - }) + _obj = cls.model_validate( + { + "enabled": obj.get("enabled"), + "connections": obj.get("connections"), + "disable_native_login": obj.get("disable_native_login"), + } + ) return _obj - - diff --git a/saturn_api/models/authorization_code_grant.py b/saturn_api/models/authorization_code_grant.py index 92fb258..ad34ea8 100644 --- a/saturn_api/models/authorization_code_grant.py +++ b/saturn_api/models/authorization_code_grant.py @@ -1,41 +1,42 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class AuthorizationCodeGrant(BaseModel): """ AuthorizationCodeGrant - """ # noqa: E501 - grant_type: Literal['authorization_code'] + """ # noqa: E501 + + grant_type: Literal["authorization_code"] code: StrictStr = Field(description="OAuth response code.") code_verifier: StrictStr = Field(description="OAuth code verifier for the PKCE request.") redirect_uri: StrictStr = Field(description="OAuth redirect URI.") __properties: ClassVar[List[str]] = ["grant_type", "code", "code_verifier", "redirect_uri"] - @field_validator('grant_type') + @field_validator("grant_type") def grant_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['authorization_code']): + if value not in set(["authorization_code"]): raise ValueError("must be one of enum values ('authorization_code')") return value @@ -45,7 +46,6 @@ def grant_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -89,12 +88,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "grant_type": obj.get("grant_type"), - "code": obj.get("code"), - "code_verifier": obj.get("code_verifier"), - "redirect_uri": obj.get("redirect_uri") - }) + _obj = cls.model_validate( + { + "grant_type": obj.get("grant_type"), + "code": obj.get("code"), + "code_verifier": obj.get("code_verifier"), + "redirect_uri": obj.get("redirect_uri"), + } + ) return _obj - - diff --git a/saturn_api/models/authorization_grant.py b/saturn_api/models/authorization_grant.py index ac56497..70d044e 100644 --- a/saturn_api/models/authorization_grant.py +++ b/saturn_api/models/authorization_grant.py @@ -1,36 +1,51 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.authorization_code_grant import AuthorizationCodeGrant from saturn_api.models.authorization_refresh_grant import AuthorizationRefreshGrant -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar AUTHORIZATIONGRANT_ONE_OF_SCHEMAS = ["AuthorizationCodeGrant", "AuthorizationRefreshGrant"] -T = TypeVar("T", AuthorizationCodeGrant, AuthorizationRefreshGrant, default=Union[AuthorizationCodeGrant, AuthorizationRefreshGrant]) +T = TypeVar( + "T", + AuthorizationCodeGrant, + AuthorizationRefreshGrant, + default=Union[AuthorizationCodeGrant, AuthorizationRefreshGrant], +) + class AuthorizationGrant(RootModel[T]): """ AuthorizationGrant """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -67,5 +82,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/authorization_refresh_grant.py b/saturn_api/models/authorization_refresh_grant.py index 4a9b2b3..138e66b 100644 --- a/saturn_api/models/authorization_refresh_grant.py +++ b/saturn_api/models/authorization_refresh_grant.py @@ -1,39 +1,40 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class AuthorizationRefreshGrant(BaseModel): """ AuthorizationRefreshGrant - """ # noqa: E501 - grant_type: Literal['refresh_token'] + """ # noqa: E501 + + grant_type: Literal["refresh_token"] refresh_token: StrictStr = Field(description="Refresh token for retrieving a new token pair.") __properties: ClassVar[List[str]] = ["grant_type", "refresh_token"] - @field_validator('grant_type') + @field_validator("grant_type") def grant_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['refresh_token']): + if value not in set(["refresh_token"]): raise ValueError("must be one of enum values ('refresh_token')") return value @@ -43,7 +44,6 @@ def grant_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -87,10 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "grant_type": obj.get("grant_type"), - "refresh_token": obj.get("refresh_token") - }) + _obj = cls.model_validate( + {"grant_type": obj.get("grant_type"), "refresh_token": obj.get("refresh_token")} + ) return _obj - - diff --git a/saturn_api/models/authorization_token_response.py b/saturn_api/models/authorization_token_response.py index 33a6389..26dc864 100644 --- a/saturn_api/models/authorization_token_response.py +++ b/saturn_api/models/authorization_token_response.py @@ -1,40 +1,53 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class AuthorizationTokenResponse(BaseModel): """ AuthorizationTokenResponse - """ # noqa: E501 + """ # noqa: E501 + access_token: StrictStr = Field(description="API access token.") refresh_token: StrictStr = Field(description="API refresh token.") token_type: StrictStr = Field(description="Type of the token. Only 'Bearer' is supported.") expires_at: Optional[datetime] = Field(description="Token expiration timestamp.") - refresh_expires_at: Optional[datetime] = Field(description="Refresh token expiration timestamp.") + refresh_expires_at: Optional[datetime] = Field( + description="Refresh token expiration timestamp." + ) expires_in: Optional[StrictInt] = Field(description="Lifetime of the token in seconds.") - refresh_expires_in: Optional[StrictInt] = Field(description="Lifetime of the refresh token in seconds.") - __properties: ClassVar[List[str]] = ["access_token", "refresh_token", "token_type", "expires_at", "refresh_expires_at", "expires_in", "refresh_expires_in"] + refresh_expires_in: Optional[StrictInt] = Field( + description="Lifetime of the refresh token in seconds." + ) + __properties: ClassVar[List[str]] = [ + "access_token", + "refresh_token", + "token_type", + "expires_at", + "refresh_expires_at", + "expires_in", + "refresh_expires_in", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +55,6 @@ class AuthorizationTokenResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +79,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,22 +89,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None + _dict["expires_at"] = None # set to None if refresh_expires_at (nullable) is None # and model_fields_set contains the field if self.refresh_expires_at is None and "refresh_expires_at" in self.model_fields_set: - _dict['refresh_expires_at'] = None + _dict["refresh_expires_at"] = None # set to None if expires_in (nullable) is None # and model_fields_set contains the field if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict['expires_in'] = None + _dict["expires_in"] = None # set to None if refresh_expires_in (nullable) is None # and model_fields_set contains the field if self.refresh_expires_in is None and "refresh_expires_in" in self.model_fields_set: - _dict['refresh_expires_in'] = None + _dict["refresh_expires_in"] = None return _dict @@ -106,15 +117,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "access_token": obj.get("access_token"), - "refresh_token": obj.get("refresh_token"), - "token_type": obj.get("token_type"), - "expires_at": obj.get("expires_at"), - "refresh_expires_at": obj.get("refresh_expires_at"), - "expires_in": obj.get("expires_in"), - "refresh_expires_in": obj.get("refresh_expires_in") - }) + _obj = cls.model_validate( + { + "access_token": obj.get("access_token"), + "refresh_token": obj.get("refresh_token"), + "token_type": obj.get("token_type"), + "expires_at": obj.get("expires_at"), + "refresh_expires_at": obj.get("refresh_expires_at"), + "expires_in": obj.get("expires_in"), + "refresh_expires_in": obj.get("refresh_expires_in"), + } + ) return _obj - - diff --git a/saturn_api/models/build_data.py b/saturn_api/models/build_data.py index 52cd7d4..4921411 100644 --- a/saturn_api/models/build_data.py +++ b/saturn_api/models/build_data.py @@ -1,45 +1,70 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class BuildData(BaseModel): """ BuildData - """ # noqa: E501 + """ # noqa: E501 + base_image: Optional[StrictStr] = Field(default=None, description="Base image to build from.") - environment_yml: Optional[StrictStr] = Field(default=None, description="Conda environment to install.") - requirements_txt: Optional[StrictStr] = Field(default=None, description="Pip requirements to install.") + environment_yml: Optional[StrictStr] = Field( + default=None, description="Conda environment to install." + ) + requirements_txt: Optional[StrictStr] = Field( + default=None, description="Pip requirements to install." + ) cran_packages: Optional[StrictStr] = Field(default=None, description="Cran packages to install") - bioconductor_packages: Optional[StrictStr] = Field(default=None, description="Bioconductor packages to install.") - remotes_packages: Optional[StrictStr] = Field(default=None, description="Remotes packages to install.") + bioconductor_packages: Optional[StrictStr] = Field( + default=None, description="Bioconductor packages to install." + ) + remotes_packages: Optional[StrictStr] = Field( + default=None, description="Remotes packages to install." + ) apt_txt: Optional[StrictStr] = Field(default=None, description="Apt packages to install.") post_build: Optional[StrictStr] = Field(default=None, description="Post-build script to run.") - use_mamba: Optional[StrictBool] = Field(default=False, description="Enable installing conda packages with mamba") + use_mamba: Optional[StrictBool] = Field( + default=False, description="Enable installing conda packages with mamba" + ) adapt_image: Optional[StrictBool] = False register_ipython_kernel: Optional[StrictBool] = None rstudio_version: Optional[StrictStr] = None install_r: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["base_image", "environment_yml", "requirements_txt", "cran_packages", "bioconductor_packages", "remotes_packages", "apt_txt", "post_build", "use_mamba", "adapt_image", "register_ipython_kernel", "rstudio_version", "install_r"] + __properties: ClassVar[List[str]] = [ + "base_image", + "environment_yml", + "requirements_txt", + "cran_packages", + "bioconductor_packages", + "remotes_packages", + "apt_txt", + "post_build", + "use_mamba", + "adapt_image", + "register_ipython_kernel", + "rstudio_version", + "install_r", + ] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +72,6 @@ class BuildData(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,8 +96,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -83,47 +106,47 @@ def to_dict(self) -> Dict[str, Any]: # set to None if base_image (nullable) is None # and model_fields_set contains the field if self.base_image is None and "base_image" in self.model_fields_set: - _dict['base_image'] = None + _dict["base_image"] = None # set to None if environment_yml (nullable) is None # and model_fields_set contains the field if self.environment_yml is None and "environment_yml" in self.model_fields_set: - _dict['environment_yml'] = None + _dict["environment_yml"] = None # set to None if requirements_txt (nullable) is None # and model_fields_set contains the field if self.requirements_txt is None and "requirements_txt" in self.model_fields_set: - _dict['requirements_txt'] = None + _dict["requirements_txt"] = None # set to None if cran_packages (nullable) is None # and model_fields_set contains the field if self.cran_packages is None and "cran_packages" in self.model_fields_set: - _dict['cran_packages'] = None + _dict["cran_packages"] = None # set to None if bioconductor_packages (nullable) is None # and model_fields_set contains the field if self.bioconductor_packages is None and "bioconductor_packages" in self.model_fields_set: - _dict['bioconductor_packages'] = None + _dict["bioconductor_packages"] = None # set to None if remotes_packages (nullable) is None # and model_fields_set contains the field if self.remotes_packages is None and "remotes_packages" in self.model_fields_set: - _dict['remotes_packages'] = None + _dict["remotes_packages"] = None # set to None if apt_txt (nullable) is None # and model_fields_set contains the field if self.apt_txt is None and "apt_txt" in self.model_fields_set: - _dict['apt_txt'] = None + _dict["apt_txt"] = None # set to None if post_build (nullable) is None # and model_fields_set contains the field if self.post_build is None and "post_build" in self.model_fields_set: - _dict['post_build'] = None + _dict["post_build"] = None # set to None if rstudio_version (nullable) is None # and model_fields_set contains the field if self.rstudio_version is None and "rstudio_version" in self.model_fields_set: - _dict['rstudio_version'] = None + _dict["rstudio_version"] = None return _dict @@ -136,21 +159,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "base_image": obj.get("base_image"), - "environment_yml": obj.get("environment_yml"), - "requirements_txt": obj.get("requirements_txt"), - "cran_packages": obj.get("cran_packages"), - "bioconductor_packages": obj.get("bioconductor_packages"), - "remotes_packages": obj.get("remotes_packages"), - "apt_txt": obj.get("apt_txt"), - "post_build": obj.get("post_build"), - "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, - "adapt_image": obj.get("adapt_image") if obj.get("adapt_image") is not None else False, - "register_ipython_kernel": obj.get("register_ipython_kernel"), - "rstudio_version": obj.get("rstudio_version"), - "install_r": obj.get("install_r") - }) + _obj = cls.model_validate( + { + "base_image": obj.get("base_image"), + "environment_yml": obj.get("environment_yml"), + "requirements_txt": obj.get("requirements_txt"), + "cran_packages": obj.get("cran_packages"), + "bioconductor_packages": obj.get("bioconductor_packages"), + "remotes_packages": obj.get("remotes_packages"), + "apt_txt": obj.get("apt_txt"), + "post_build": obj.get("post_build"), + "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, + "adapt_image": ( + obj.get("adapt_image") if obj.get("adapt_image") is not None else False + ), + "register_ipython_kernel": obj.get("register_ipython_kernel"), + "rstudio_version": obj.get("rstudio_version"), + "install_r": obj.get("install_r"), + } + ) return _obj - - diff --git a/saturn_api/models/cluster.py b/saturn_api/models/cluster.py index 5415f9a..1cc6f3b 100644 --- a/saturn_api/models/cluster.py +++ b/saturn_api/models/cluster.py @@ -1,41 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.cluster_connection_type import ClusterConnectionType -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.cluster_connection_type import ClusterConnectionType + + class Cluster(BaseModel): """ Cluster - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="Cluster ID.") name: StrictStr = Field(description="Cluster name.") org_id: StrictStr = Field(description="Owning org ID.") connection_type: ClusterConnectionType server_url: Optional[StrictStr] = Field(default=None, description="K8s API server URL.") - utilities: Optional[Dict[str, Any]] = Field(default=None, description="ClusterUtilities metadata.") + utilities: Optional[Dict[str, Any]] = Field( + default=None, description="ClusterUtilities metadata." + ) created_at: StrictStr = Field(description="Creation timestamp.") updated_at: StrictStr = Field(description="Last update timestamp.") - __properties: ClassVar[List[str]] = ["id", "name", "org_id", "connection_type", "server_url", "utilities", "created_at", "updated_at"] + __properties: ClassVar[List[str]] = [ + "id", + "name", + "org_id", + "connection_type", + "server_url", + "utilities", + "created_at", + "updated_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +56,6 @@ class Cluster(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,15 +87,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "org_id", - "server_url", - "utilities", - "created_at", - "updated_at", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "org_id", + "server_url", + "utilities", + "created_at", + "updated_at", + ] + ) _dict = self.model_dump( by_alias=True, @@ -93,12 +107,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if server_url (nullable) is None # and model_fields_set contains the field if self.server_url is None and "server_url" in self.model_fields_set: - _dict['server_url'] = None + _dict["server_url"] = None # set to None if utilities (nullable) is None # and model_fields_set contains the field if self.utilities is None and "utilities" in self.model_fields_set: - _dict['utilities'] = None + _dict["utilities"] = None return _dict @@ -111,16 +125,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "org_id": obj.get("org_id"), - "connection_type": obj.get("connection_type"), - "server_url": obj.get("server_url"), - "utilities": obj.get("utilities"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "org_id": obj.get("org_id"), + "connection_type": obj.get("connection_type"), + "server_url": obj.get("server_url"), + "utilities": obj.get("utilities"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + } + ) return _obj - - diff --git a/saturn_api/models/cluster_connection_type.py b/saturn_api/models/cluster_connection_type.py index d87651d..d4c2272 100644 --- a/saturn_api/models/cluster_connection_type.py +++ b/saturn_api/models/cluster_connection_type.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +27,10 @@ class ClusterConnectionType(str, Enum): """ allowed enum values """ - INCLUSTER = 'incluster' - TOKEN = 'token' + INCLUSTER = "incluster" + TOKEN = "token" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ClusterConnectionType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/cluster_create.py b/saturn_api/models/cluster_create.py index 29ec102..868081d 100644 --- a/saturn_api/models/cluster_create.py +++ b/saturn_api/models/cluster_create.py @@ -1,40 +1,60 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.cluster_connection_type import ClusterConnectionType -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.cluster_connection_type import ClusterConnectionType + + class ClusterCreate(BaseModel): """ ClusterCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Unique name of the cluster.") org_id: StrictStr = Field(description="ID of the org that owns the cluster.") connection_type: ClusterConnectionType - server_url: Optional[StrictStr] = Field(default=None, description="K8s API server URL. Required when connection_type is 'token'.") - ca_bundle: Optional[StrictStr] = Field(default=None, description="Base64-encoded CA bundle. Required when connection_type is 'token'.") - token: Optional[StrictStr] = Field(default=None, description="Bearer token for k8s API. Required when connection_type is 'token'.") - utilities: Optional[Dict[str, Any]] = Field(default=None, description="ClusterUtilities metadata (service endpoints).") - __properties: ClassVar[List[str]] = ["name", "org_id", "connection_type", "server_url", "ca_bundle", "token", "utilities"] + server_url: Optional[StrictStr] = Field( + default=None, description="K8s API server URL. Required when connection_type is 'token'." + ) + ca_bundle: Optional[StrictStr] = Field( + default=None, + description="Base64-encoded CA bundle. Required when connection_type is 'token'.", + ) + token: Optional[StrictStr] = Field( + default=None, + description="Bearer token for k8s API. Required when connection_type is 'token'.", + ) + utilities: Optional[Dict[str, Any]] = Field( + default=None, description="ClusterUtilities metadata (service endpoints)." + ) + __properties: ClassVar[List[str]] = [ + "name", + "org_id", + "connection_type", + "server_url", + "ca_bundle", + "token", + "utilities", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +62,6 @@ class ClusterCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,22 +96,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if server_url (nullable) is None # and model_fields_set contains the field if self.server_url is None and "server_url" in self.model_fields_set: - _dict['server_url'] = None + _dict["server_url"] = None # set to None if ca_bundle (nullable) is None # and model_fields_set contains the field if self.ca_bundle is None and "ca_bundle" in self.model_fields_set: - _dict['ca_bundle'] = None + _dict["ca_bundle"] = None # set to None if token (nullable) is None # and model_fields_set contains the field if self.token is None and "token" in self.model_fields_set: - _dict['token'] = None + _dict["token"] = None # set to None if utilities (nullable) is None # and model_fields_set contains the field if self.utilities is None and "utilities" in self.model_fields_set: - _dict['utilities'] = None + _dict["utilities"] = None return _dict @@ -106,15 +124,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "org_id": obj.get("org_id"), - "connection_type": obj.get("connection_type"), - "server_url": obj.get("server_url"), - "ca_bundle": obj.get("ca_bundle"), - "token": obj.get("token"), - "utilities": obj.get("utilities") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "org_id": obj.get("org_id"), + "connection_type": obj.get("connection_type"), + "server_url": obj.get("server_url"), + "ca_bundle": obj.get("ca_bundle"), + "token": obj.get("token"), + "utilities": obj.get("utilities"), + } + ) return _obj - - diff --git a/saturn_api/models/cluster_list.py b/saturn_api/models/cluster_list.py index e07f2c9..46d13cb 100644 --- a/saturn_api/models/cluster_list.py +++ b/saturn_api/models/cluster_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.cluster import Cluster -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.cluster import Cluster + + class ClusterList(BaseModel): """ ClusterList - """ # noqa: E501 + """ # noqa: E501 + clusters: List[Cluster] = Field(description="List of clusters.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ClusterList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "clusters", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "clusters", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_clusters in self.clusters: if _item_clusters: _items.append(_item_clusters.to_dict()) - _dict['clusters'] = _items + _dict["clusters"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "clusters": [Cluster.from_dict(_item) for _item in obj["clusters"]] if obj.get("clusters") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "clusters": ( + [Cluster.from_dict(_item) for _item in obj["clusters"]] + if obj.get("clusters") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/cluster_update.py b/saturn_api/models/cluster_update.py index 20fcf76..6000c51 100644 --- a/saturn_api/models/cluster_update.py +++ b/saturn_api/models/cluster_update.py @@ -1,38 +1,48 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.cluster_connection_type import ClusterConnectionType -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.cluster_connection_type import ClusterConnectionType + + class ClusterUpdate(BaseModel): """ ClusterUpdate - """ # noqa: E501 + """ # noqa: E501 + connection_type: Optional[ClusterConnectionType] = None server_url: Optional[StrictStr] = Field(default=None, description="K8s API server URL.") ca_bundle: Optional[StrictStr] = Field(default=None, description="Base64-encoded CA bundle.") token: Optional[StrictStr] = Field(default=None, description="Bearer token.") - utilities: Optional[Dict[str, Any]] = Field(default=None, description="ClusterUtilities metadata.") - __properties: ClassVar[List[str]] = ["connection_type", "server_url", "ca_bundle", "token", "utilities"] + utilities: Optional[Dict[str, Any]] = Field( + default=None, description="ClusterUtilities metadata." + ) + __properties: ClassVar[List[str]] = [ + "connection_type", + "server_url", + "ca_bundle", + "token", + "utilities", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +50,6 @@ class ClusterUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,22 +84,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if server_url (nullable) is None # and model_fields_set contains the field if self.server_url is None and "server_url" in self.model_fields_set: - _dict['server_url'] = None + _dict["server_url"] = None # set to None if ca_bundle (nullable) is None # and model_fields_set contains the field if self.ca_bundle is None and "ca_bundle" in self.model_fields_set: - _dict['ca_bundle'] = None + _dict["ca_bundle"] = None # set to None if token (nullable) is None # and model_fields_set contains the field if self.token is None and "token" in self.model_fields_set: - _dict['token'] = None + _dict["token"] = None # set to None if utilities (nullable) is None # and model_fields_set contains the field if self.utilities is None and "utilities" in self.model_fields_set: - _dict['utilities'] = None + _dict["utilities"] = None return _dict @@ -104,13 +112,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "connection_type": obj.get("connection_type"), - "server_url": obj.get("server_url"), - "ca_bundle": obj.get("ca_bundle"), - "token": obj.get("token"), - "utilities": obj.get("utilities") - }) + _obj = cls.model_validate( + { + "connection_type": obj.get("connection_type"), + "server_url": obj.get("server_url"), + "ca_bundle": obj.get("ca_bundle"), + "token": obj.get("token"), + "utilities": obj.get("utilities"), + } + ) return _obj - - diff --git a/saturn_api/models/concurrency_policy.py b/saturn_api/models/concurrency_policy.py index d30b3e7..e651386 100644 --- a/saturn_api/models/concurrency_policy.py +++ b/saturn_api/models/concurrency_policy.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class ConcurrencyPolicy(str, Enum): """ allowed enum values """ - ALLOW = 'Allow' - FORBID = 'Forbid' - REPLACE = 'Replace' + ALLOW = "Allow" + FORBID = "Forbid" + REPLACE = "Replace" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ConcurrencyPolicy from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/condition.py b/saturn_api/models/condition.py index e26bedf..3d6ad6b 100644 --- a/saturn_api/models/condition.py +++ b/saturn_api/models/condition.py @@ -1,39 +1,47 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class Condition(BaseModel): """ Condition - """ # noqa: E501 + """ # noqa: E501 + type: StrictStr status: StrictStr reason: Optional[StrictStr] message: Optional[StrictStr] last_transition_time: Optional[datetime] last_probe_time: Optional[datetime] - __properties: ClassVar[List[str]] = ["type", "status", "reason", "message", "last_transition_time", "last_probe_time"] + __properties: ClassVar[List[str]] = [ + "type", + "status", + "reason", + "message", + "last_transition_time", + "last_probe_time", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +49,6 @@ class Condition(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,14 +79,16 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "type", - "status", - "reason", - "message", - "last_transition_time", - "last_probe_time", - ]) + excluded_fields: Set[str] = set( + [ + "type", + "status", + "reason", + "message", + "last_transition_time", + "last_probe_time", + ] + ) _dict = self.model_dump( by_alias=True, @@ -89,22 +98,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: - _dict['reason'] = None + _dict["reason"] = None # set to None if message (nullable) is None # and model_fields_set contains the field if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None + _dict["message"] = None # set to None if last_transition_time (nullable) is None # and model_fields_set contains the field if self.last_transition_time is None and "last_transition_time" in self.model_fields_set: - _dict['last_transition_time'] = None + _dict["last_transition_time"] = None # set to None if last_probe_time (nullable) is None # and model_fields_set contains the field if self.last_probe_time is None and "last_probe_time" in self.model_fields_set: - _dict['last_probe_time'] = None + _dict["last_probe_time"] = None return _dict @@ -117,14 +126,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "status": obj.get("status"), - "reason": obj.get("reason"), - "message": obj.get("message"), - "last_transition_time": obj.get("last_transition_time"), - "last_probe_time": obj.get("last_probe_time") - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "status": obj.get("status"), + "reason": obj.get("reason"), + "message": obj.get("message"), + "last_transition_time": obj.get("last_transition_time"), + "last_probe_time": obj.get("last_probe_time"), + } + ) return _obj - - diff --git a/saturn_api/models/config_file_entry.py b/saturn_api/models/config_file_entry.py new file mode 100644 index 0000000..35e79cf --- /dev/null +++ b/saturn_api/models/config_file_entry.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class ConfigFileEntry(BaseModel): + """ + ConfigFileEntry + """ # noqa: E501 + + content: StrictStr = Field(description="Content of the config file.") + mode: Optional[StrictStr] = Field( + default="0644", description="File mode as a 4-character octal string, e.g. '0644'." + ) + __properties: ClassVar[List[str]] = ["content", "mode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfigFileEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfigFileEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "content": obj.get("content"), + "mode": obj.get("mode") if obj.get("mode") is not None else "0644", + } + ) + return _obj diff --git a/saturn_api/models/container_runtime_summary.py b/saturn_api/models/container_runtime_summary.py index bebbbd5..ff58d51 100644 --- a/saturn_api/models/container_runtime_summary.py +++ b/saturn_api/models/container_runtime_summary.py @@ -1,35 +1,44 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) +from typing_extensions import Self + from saturn_api.models.condition import Condition from saturn_api.models.container_status import ContainerStatus from saturn_api.models.restart_policy import RestartPolicy -from typing import Literal, Optional, Set -from typing_extensions import Self + class ContainerRuntimeSummary(BaseModel): """ ContainerRuntimeSummary - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr namespace: StrictStr uid: StrictStr @@ -45,17 +54,35 @@ class ContainerRuntimeSummary(BaseModel): restart_policy: RestartPolicy image_pulled: StrictBool exit_code: Optional[StrictInt] - reason: Literal['Evicted', 'OOMKilled'] | None + reason: Literal["Evicted", "OOMKilled"] | None previous: Optional[ContainerRuntimeSummary] - __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "finished_at", "restart_policy", "image_pulled", "exit_code", "reason", "previous"] - - @field_validator('reason') + __properties: ClassVar[List[str]] = [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "status", + "finished_at", + "restart_policy", + "image_pulled", + "exit_code", + "reason", + "previous", + ] + + @field_validator("reason") def reason_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Evicted', 'OOMKilled']): + if value not in set(["Evicted", "OOMKilled"]): raise ValueError("must be one of enum values ('Evicted', 'OOMKilled')") return value @@ -65,7 +92,6 @@ def reason_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -105,23 +131,25 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "finished_at", - "image_pulled", - "exit_code", - "reason", - "previous", - ]) + excluded_fields: Set[str] = set( + [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "finished_at", + "image_pulled", + "exit_code", + "reason", + "previous", + ] + ) _dict = self.model_dump( by_alias=True, @@ -134,49 +162,49 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict['conditions'] = _items + _dict["conditions"] = _items # override the default output from pydantic by calling `to_dict()` of previous if self.previous: - _dict['previous'] = self.previous.to_dict() + _dict["previous"] = self.previous.to_dict() # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict['controller_uid'] = None + _dict["controller_uid"] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict['controller_kind'] = None + _dict["controller_kind"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None + _dict["deleted_at"] = None # set to None if finished_at (nullable) is None # and model_fields_set contains the field if self.finished_at is None and "finished_at" in self.model_fields_set: - _dict['finished_at'] = None + _dict["finished_at"] = None # set to None if exit_code (nullable) is None # and model_fields_set contains the field if self.exit_code is None and "exit_code" in self.model_fields_set: - _dict['exit_code'] = None + _dict["exit_code"] = None # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: - _dict['reason'] = None + _dict["reason"] = None # set to None if previous (nullable) is None # and model_fields_set contains the field if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None + _dict["previous"] = None return _dict @@ -189,27 +217,37 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "finished_at": obj.get("finished_at"), - "restart_policy": obj.get("restart_policy"), - "image_pulled": obj.get("image_pulled"), - "exit_code": obj.get("exit_code"), - "reason": obj.get("reason"), - "previous": ContainerRuntimeSummary.from_dict(obj["previous"]) if obj.get("previous") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": ( + [Condition.from_dict(_item) for _item in obj["conditions"]] + if obj.get("conditions") is not None + else None + ), + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "finished_at": obj.get("finished_at"), + "restart_policy": obj.get("restart_policy"), + "image_pulled": obj.get("image_pulled"), + "exit_code": obj.get("exit_code"), + "reason": obj.get("reason"), + "previous": ( + ContainerRuntimeSummary.from_dict(obj["previous"]) + if obj.get("previous") is not None + else None + ), + } + ) return _obj + # TODO: Rewrite to not use raise_errors ContainerRuntimeSummary.model_rebuild(raise_errors=False) - diff --git a/saturn_api/models/container_status.py b/saturn_api/models/container_status.py index beb31f4..1af878a 100644 --- a/saturn_api/models/container_status.py +++ b/saturn_api/models/container_status.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,15 +27,13 @@ class ContainerStatus(str, Enum): """ allowed enum values """ - RUNNING = 'running' - PENDING = 'pending' - WAITING = 'waiting' - COMPLETED = 'completed' - ERROR = 'error' + RUNNING = "running" + PENDING = "pending" + WAITING = "waiting" + COMPLETED = "completed" + ERROR = "error" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ContainerStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/cron_schedule.py b/saturn_api/models/cron_schedule.py index 2d25e10..6a3493b 100644 --- a/saturn_api/models/cron_schedule.py +++ b/saturn_api/models/cron_schedule.py @@ -1,39 +1,40 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class CronSchedule(BaseModel): """ CronSchedule - """ # noqa: E501 + """ # noqa: E501 + schedule: StrictStr = Field(description="Cron schedule for triggering the job.") - concurrency_policy: Literal['Allow', 'Forbid', 'Replace'] + concurrency_policy: Literal["Allow", "Forbid", "Replace"] __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy"] - @field_validator('concurrency_policy') + @field_validator("concurrency_policy") def concurrency_policy_validate_enum(cls, value): """Validates the enum""" - if value not in set(['Allow', 'Forbid', 'Replace']): + if value not in set(["Allow", "Forbid", "Replace"]): raise ValueError("must be one of enum values ('Allow', 'Forbid', 'Replace')") return value @@ -43,7 +44,6 @@ def concurrency_policy_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,10 +70,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "schedule", - "concurrency_policy", - ]) + excluded_fields: Set[str] = set( + [ + "schedule", + "concurrency_policy", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,10 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy") - }) + _obj = cls.model_validate( + {"schedule": obj.get("schedule"), "concurrency_policy": obj.get("concurrency_policy")} + ) return _obj - - diff --git a/saturn_api/models/cron_schedule_create.py b/saturn_api/models/cron_schedule_create.py index 4ede9a1..48d4139 100644 --- a/saturn_api/models/cron_schedule_create.py +++ b/saturn_api/models/cron_schedule_create.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.concurrency_policy import ConcurrencyPolicy -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.concurrency_policy import ConcurrencyPolicy + + class CronScheduleCreate(BaseModel): """ CronScheduleCreate - """ # noqa: E501 + """ # noqa: E501 + schedule: StrictStr = Field(description="Cron schedule for triggering the job.") concurrency_policy: Optional[ConcurrencyPolicy] = None __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy"] @@ -37,7 +39,6 @@ class CronScheduleCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy") - }) + _obj = cls.model_validate( + {"schedule": obj.get("schedule"), "concurrency_policy": obj.get("concurrency_policy")} + ) return _obj - - diff --git a/saturn_api/models/cron_schedule_update.py b/saturn_api/models/cron_schedule_update.py index 187b1f3..a746793 100644 --- a/saturn_api/models/cron_schedule_update.py +++ b/saturn_api/models/cron_schedule_update.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.concurrency_policy import ConcurrencyPolicy -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.concurrency_policy import ConcurrencyPolicy + + class CronScheduleUpdate(BaseModel): """ CronScheduleUpdate - """ # noqa: E501 - schedule: Optional[StrictStr] = Field(default=None, description="Cron schedule for triggering the job.") + """ # noqa: E501 + + schedule: Optional[StrictStr] = Field( + default=None, description="Cron schedule for triggering the job." + ) concurrency_policy: Optional[ConcurrencyPolicy] = None __properties: ClassVar[List[str]] = ["schedule", "concurrency_policy"] @@ -37,7 +41,6 @@ class CronScheduleUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy") - }) + _obj = cls.model_validate( + {"schedule": obj.get("schedule"), "concurrency_policy": obj.get("concurrency_policy")} + ) return _obj - - diff --git a/saturn_api/models/daily_usage.py b/saturn_api/models/daily_usage.py index bdc7ba7..caf03b9 100644 --- a/saturn_api/models/daily_usage.py +++ b/saturn_api/models/daily_usage.py @@ -1,38 +1,45 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar, Dict, List, Optional, Set, Union + from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Literal, Optional, Set from typing_extensions import Self + class DailyUsage(BaseModel): """ DailyUsage - """ # noqa: E501 + """ # noqa: E501 + hours: Union[StrictFloat, StrictInt] = Field(description="Compute hours used.") dollars: Union[StrictFloat, StrictInt] = Field(description="Dollars spent.") var_date: date = Field(description="Date of the usage record.", alias="date") instance_type: StrictStr = Field(description="Instance type used.") resource_type: StrictStr = Field(description="Resource type used.") - __properties: ClassVar[List[str]] = ["hours", "dollars", "date", "instance_type", "resource_type"] + __properties: ClassVar[List[str]] = [ + "hours", + "dollars", + "date", + "instance_type", + "resource_type", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +47,6 @@ class DailyUsage(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +71,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,13 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hours": obj.get("hours"), - "dollars": obj.get("dollars"), - "date": obj.get("date"), - "instance_type": obj.get("instance_type"), - "resource_type": obj.get("resource_type") - }) + _obj = cls.model_validate( + { + "hours": obj.get("hours"), + "dollars": obj.get("dollars"), + "date": obj.get("date"), + "instance_type": obj.get("instance_type"), + "resource_type": obj.get("resource_type"), + } + ) return _obj - - diff --git a/saturn_api/models/daily_usage_list.py b/saturn_api/models/daily_usage_list.py index d808f3c..45a0489 100644 --- a/saturn_api/models/daily_usage_list.py +++ b/saturn_api/models/daily_usage_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.daily_usage import DailyUsage -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.daily_usage import DailyUsage + + class DailyUsageList(BaseModel): """ DailyUsageList - """ # noqa: E501 + """ # noqa: E501 + usage: List[DailyUsage] = Field(description="List of daily usage records.") __properties: ClassVar[List[str]] = ["usage"] @@ -36,7 +38,6 @@ class DailyUsageList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_usage in self.usage: if _item_usage: _items.append(_item_usage.to_dict()) - _dict['usage'] = _items + _dict["usage"] = _items return _dict @classmethod @@ -87,9 +87,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "usage": [DailyUsage.from_dict(_item) for _item in obj["usage"]] if obj.get("usage") is not None else None - }) + _obj = cls.model_validate( + { + "usage": ( + [DailyUsage.from_dict(_item) for _item in obj["usage"]] + if obj.get("usage") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster.py b/saturn_api/models/dask_cluster.py index 71bf064..a05364b 100644 --- a/saturn_api/models/dask_cluster.py +++ b/saturn_api/models/dask_cluster.py @@ -1,62 +1,115 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner import Owner -from typing import Literal, Optional, Set +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from typing_extensions import Self +from saturn_api.models.owner import Owner + + class DaskCluster(BaseModel): """ DaskCluster - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the dask cluster.") name: StrictStr = Field(description="Name of the resource the dask cluster is attached to.") - resource_type: Literal['dask'] - tags: Optional[Dict[str, StrictStr]] = Field(description="Descriptive tags for the dask cluster.") + resource_type: Literal["dask"] + tags: Optional[Dict[str, StrictStr]] = Field( + description="Descriptive tags for the dask cluster." + ) worker_size: StrictStr = Field(description="Instance size of the dask workers.") - worker_size_display: StrictStr = Field(description="Description of the instance size for the workers.") + worker_size_display: StrictStr = Field( + description="Description of the instance size for the workers." + ) worker_is_spot: StrictBool = Field(description="Enables spot instances for the dask workers.") scheduler_size: StrictStr = Field(description="Instance size of the dask scheduler.") - scheduler_size_display: StrictStr = Field(description="Description of the instance size for the scheduler.") + scheduler_size_display: StrictStr = Field( + description="Description of the instance size for the scheduler." + ) n_workers: StrictInt = Field(description="Number of dask workers.") nprocs: StrictInt = Field(description="Number of processes per worker.") nthreads: StrictInt = Field(description="Number of threads per process.") scheduler_url: StrictStr = Field(description="Internal address for the dask scheduler") subdomain: StrictStr = Field(description="Subdomain for the dask dashboard.") - image: StrictStr = Field(description="Image for the dask cluster and resource it is attached to.") + image: StrictStr = Field( + description="Image for the dask cluster and resource it is attached to." + ) created_at: StrictStr = Field(description="Creation timestamp.") status: StrictStr = Field(description="Current status of the dask cluster.") - warnings: Optional[List[StrictStr]] = Field(default=None, description="Messages with warnings about the state of the dask cluster.") - errors: Optional[List[StrictStr]] = Field(default=None, description="Messages with errors about the state of the dask cluster.") + warnings: Optional[List[StrictStr]] = Field( + default=None, description="Messages with warnings about the state of the dask cluster." + ) + errors: Optional[List[StrictStr]] = Field( + default=None, description="Messages with errors about the state of the dask cluster." + ) url: StrictStr = Field(description="External URL for the dask dashboard.") owner: Owner = Field(description="Owner of the dask cluster.") - deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID the dask cluster is attached to.") - job_id: Optional[StrictStr] = Field(default=None, description="Job ID the dask cluster is attached to.") - workspace_id: Optional[StrictStr] = Field(default=None, description="Workspace ID the dask cluster is attached to.") - __properties: ClassVar[List[str]] = ["id", "name", "resource_type", "tags", "worker_size", "worker_size_display", "worker_is_spot", "scheduler_size", "scheduler_size_display", "n_workers", "nprocs", "nthreads", "scheduler_url", "subdomain", "image", "created_at", "status", "warnings", "errors", "url", "owner", "deployment_id", "job_id", "workspace_id"] + deployment_id: Optional[StrictStr] = Field( + default=None, description="Deployment ID the dask cluster is attached to." + ) + job_id: Optional[StrictStr] = Field( + default=None, description="Job ID the dask cluster is attached to." + ) + workspace_id: Optional[StrictStr] = Field( + default=None, description="Workspace ID the dask cluster is attached to." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "resource_type", + "tags", + "worker_size", + "worker_size_display", + "worker_is_spot", + "scheduler_size", + "scheduler_size_display", + "n_workers", + "nprocs", + "nthreads", + "scheduler_url", + "subdomain", + "image", + "created_at", + "status", + "warnings", + "errors", + "url", + "owner", + "deployment_id", + "job_id", + "workspace_id", + ] - @field_validator('resource_type') + @field_validator("resource_type") def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['dask']): + if value not in set(["dask"]): raise ValueError("must be one of enum values ('dask')") return value @@ -66,7 +119,6 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -113,30 +165,32 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "resource_type", - "tags", - "worker_size", - "worker_size_display", - "worker_is_spot", - "scheduler_size", - "scheduler_size_display", - "n_workers", - "nprocs", - "nthreads", - "scheduler_url", - "subdomain", - "image", - "created_at", - "status", - "url", - "owner", - "deployment_id", - "job_id", - "workspace_id", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "resource_type", + "tags", + "worker_size", + "worker_size_display", + "worker_is_spot", + "scheduler_size", + "scheduler_size_display", + "n_workers", + "nprocs", + "nthreads", + "scheduler_url", + "subdomain", + "image", + "created_at", + "status", + "url", + "owner", + "deployment_id", + "job_id", + "workspace_id", + ] + ) _dict = self.model_dump( by_alias=True, @@ -145,26 +199,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if deployment_id (nullable) is None # and model_fields_set contains the field if self.deployment_id is None and "deployment_id" in self.model_fields_set: - _dict['deployment_id'] = None + _dict["deployment_id"] = None # set to None if job_id (nullable) is None # and model_fields_set contains the field if self.job_id is None and "job_id" in self.model_fields_set: - _dict['job_id'] = None + _dict["job_id"] = None # set to None if workspace_id (nullable) is None # and model_fields_set contains the field if self.workspace_id is None and "workspace_id" in self.model_fields_set: - _dict['workspace_id'] = None + _dict["workspace_id"] = None return _dict @@ -177,32 +231,32 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "resource_type": obj.get("resource_type"), - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_size_display": obj.get("worker_size_display"), - "worker_is_spot": obj.get("worker_is_spot"), - "scheduler_size": obj.get("scheduler_size"), - "scheduler_size_display": obj.get("scheduler_size_display"), - "n_workers": obj.get("n_workers"), - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads"), - "scheduler_url": obj.get("scheduler_url"), - "subdomain": obj.get("subdomain"), - "image": obj.get("image"), - "created_at": obj.get("created_at"), - "status": obj.get("status"), - "warnings": obj.get("warnings"), - "errors": obj.get("errors"), - "url": obj.get("url"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "deployment_id": obj.get("deployment_id"), - "job_id": obj.get("job_id"), - "workspace_id": obj.get("workspace_id") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_size_display": obj.get("worker_size_display"), + "worker_is_spot": obj.get("worker_is_spot"), + "scheduler_size": obj.get("scheduler_size"), + "scheduler_size_display": obj.get("scheduler_size_display"), + "n_workers": obj.get("n_workers"), + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads"), + "scheduler_url": obj.get("scheduler_url"), + "subdomain": obj.get("subdomain"), + "image": obj.get("image"), + "created_at": obj.get("created_at"), + "status": obj.get("status"), + "warnings": obj.get("warnings"), + "errors": obj.get("errors"), + "url": obj.get("url"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "deployment_id": obj.get("deployment_id"), + "job_id": obj.get("job_id"), + "workspace_id": obj.get("workspace_id"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_adapt.py b/saturn_api/models/dask_cluster_adapt.py index 1d4163c..6f200f0 100644 --- a/saturn_api/models/dask_cluster_adapt.py +++ b/saturn_api/models/dask_cluster_adapt.py @@ -1,34 +1,38 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class DaskClusterAdapt(BaseModel): """ DaskClusterAdapt - """ # noqa: E501 - minimum: Annotated[int, Field(strict=True, ge=0)] = Field(description="Minimum number of dask workers for adaptive scaling.") - maximum: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of dask workers for adaptive scaling.") + """ # noqa: E501 + + minimum: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Minimum number of dask workers for adaptive scaling." + ) + maximum: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Maximum number of dask workers for adaptive scaling." + ) __properties: ClassVar[List[str]] = ["minimum", "maximum"] model_config = ConfigDict( @@ -37,7 +41,6 @@ class DaskClusterAdapt(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +83,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "minimum": obj.get("minimum"), - "maximum": obj.get("maximum") - }) + _obj = cls.model_validate({"minimum": obj.get("minimum"), "maximum": obj.get("maximum")}) return _obj - - diff --git a/saturn_api/models/dask_cluster_attachment.py b/saturn_api/models/dask_cluster_attachment.py index 7014d5c..32e44f8 100644 --- a/saturn_api/models/dask_cluster_attachment.py +++ b/saturn_api/models/dask_cluster_attachment.py @@ -1,47 +1,50 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from saturn_api.models.dask_cluster_attachment_scheduler import DaskClusterAttachmentScheduler +from typing_extensions import Annotated, Self + +from saturn_api.models.dask_cluster_attachment_scheduler import ( + DaskClusterAttachmentScheduler, +) from saturn_api.models.dask_cluster_attachment_worker import DaskClusterAttachmentWorker -from typing import Literal, Optional, Set -from typing_extensions import Self + class DaskClusterAttachment(BaseModel): """ DaskClusterAttachment - """ # noqa: E501 + """ # noqa: E501 + num_workers: Annotated[int, Field(strict=True, ge=0)] scheduler: DaskClusterAttachmentScheduler worker: DaskClusterAttachmentWorker - status: Literal['stopped', 'running'] | None = None + status: Literal["stopped", "running"] | None = None __properties: ClassVar[List[str]] = ["num_workers", "scheduler", "worker", "status"] - @field_validator('status') + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['stopped', 'running']): + if value not in set(["stopped", "running"]): raise ValueError("must be one of enum values ('stopped', 'running')") return value @@ -51,7 +54,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -86,14 +87,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of scheduler if self.scheduler: - _dict['scheduler'] = self.scheduler.to_dict() + _dict["scheduler"] = self.scheduler.to_dict() # override the default output from pydantic by calling `to_dict()` of worker if self.worker: - _dict['worker'] = self.worker.to_dict() + _dict["worker"] = self.worker.to_dict() # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None + _dict["status"] = None return _dict @@ -106,12 +107,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "num_workers": obj.get("num_workers"), - "scheduler": DaskClusterAttachmentScheduler.from_dict(obj["scheduler"]) if obj.get("scheduler") is not None else None, - "worker": DaskClusterAttachmentWorker.from_dict(obj["worker"]) if obj.get("worker") is not None else None, - "status": obj.get("status") - }) + _obj = cls.model_validate( + { + "num_workers": obj.get("num_workers"), + "scheduler": ( + DaskClusterAttachmentScheduler.from_dict(obj["scheduler"]) + if obj.get("scheduler") is not None + else None + ), + "worker": ( + DaskClusterAttachmentWorker.from_dict(obj["worker"]) + if obj.get("worker") is not None + else None + ), + "status": obj.get("status"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_attachment_scheduler.py b/saturn_api/models/dask_cluster_attachment_scheduler.py index de4999b..d2fb195 100644 --- a/saturn_api/models/dask_cluster_attachment_scheduler.py +++ b/saturn_api/models/dask_cluster_attachment_scheduler.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class DaskClusterAttachmentScheduler(BaseModel): """ DaskClusterAttachmentScheduler - """ # noqa: E501 + """ # noqa: E501 + instance_type: StrictStr __properties: ClassVar[List[str]] = ["instance_type"] @@ -35,7 +36,6 @@ class DaskClusterAttachmentScheduler(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "instance_type": obj.get("instance_type") - }) + _obj = cls.model_validate({"instance_type": obj.get("instance_type")}) return _obj - - diff --git a/saturn_api/models/dask_cluster_attachment_worker.py b/saturn_api/models/dask_cluster_attachment_worker.py index e29d0c9..d73e4e4 100644 --- a/saturn_api/models/dask_cluster_attachment_worker.py +++ b/saturn_api/models/dask_cluster_attachment_worker.py @@ -1,36 +1,42 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class DaskClusterAttachmentWorker(BaseModel): """ DaskClusterAttachmentWorker - """ # noqa: E501 + """ # noqa: E501 + instance_type: StrictStr num_processes: Optional[StrictInt] = None num_threads: Optional[StrictInt] = None use_spot_instances: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["instance_type", "num_processes", "num_threads", "use_spot_instances"] + __properties: ClassVar[List[str]] = [ + "instance_type", + "num_processes", + "num_threads", + "use_spot_instances", + ] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +44,6 @@ class DaskClusterAttachmentWorker(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,12 +86,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "instance_type": obj.get("instance_type"), - "num_processes": obj.get("num_processes"), - "num_threads": obj.get("num_threads"), - "use_spot_instances": obj.get("use_spot_instances") if obj.get("use_spot_instances") is not None else False - }) + _obj = cls.model_validate( + { + "instance_type": obj.get("instance_type"), + "num_processes": obj.get("num_processes"), + "num_threads": obj.get("num_threads"), + "use_spot_instances": ( + obj.get("use_spot_instances") + if obj.get("use_spot_instances") is not None + else False + ), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_create.py b/saturn_api/models/dask_cluster_create.py index 1a0c47d..d7977c1 100644 --- a/saturn_api/models/dask_cluster_create.py +++ b/saturn_api/models/dask_cluster_create.py @@ -1,42 +1,66 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.resource_reference import ResourceReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.resource_reference import ResourceReference + + class DaskClusterCreate(BaseModel): """ DaskClusterCreate - """ # noqa: E501 - resource: ResourceReference = Field(description="Reference to the resource to attach the dask cluster to.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the dask cluster.") - worker_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask workers.") - worker_is_spot: Optional[StrictBool] = Field(default=False, description="Enables spot instances for the dask workers.") - scheduler_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask scheduler.") + """ # noqa: E501 + + resource: ResourceReference = Field( + description="Reference to the resource to attach the dask cluster to." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the dask cluster." + ) + worker_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the dask workers." + ) + worker_is_spot: Optional[StrictBool] = Field( + default=False, description="Enables spot instances for the dask workers." + ) + scheduler_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the dask scheduler." + ) n_workers: Optional[StrictInt] = Field(default=1, description="Number of dask workers.") nprocs: Optional[StrictInt] = Field(default=None, description="Number of processes per worker.") nthreads: Optional[StrictInt] = Field(default=2, description="Number of threads per process.") - subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the dask dashboard.") - __properties: ClassVar[List[str]] = ["resource", "tags", "worker_size", "worker_is_spot", "scheduler_size", "n_workers", "nprocs", "nthreads", "subdomain"] + subdomain: Optional[StrictStr] = Field( + default=None, description="Subdomain for the dask dashboard." + ) + __properties: ClassVar[List[str]] = [ + "resource", + "tags", + "worker_size", + "worker_is_spot", + "scheduler_size", + "n_workers", + "nprocs", + "nthreads", + "subdomain", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +68,6 @@ class DaskClusterCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,16 +101,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of resource if self.resource: - _dict['resource'] = self.resource.to_dict() + _dict["resource"] = self.resource.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict['subdomain'] = None + _dict["subdomain"] = None return _dict @@ -101,17 +123,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "resource": ResourceReference.from_dict(obj["resource"]) if obj.get("resource") is not None else None, - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_is_spot": obj.get("worker_is_spot") if obj.get("worker_is_spot") is not None else False, - "scheduler_size": obj.get("scheduler_size"), - "n_workers": obj.get("n_workers") if obj.get("n_workers") is not None else 1, - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads") if obj.get("nthreads") is not None else 2, - "subdomain": obj.get("subdomain") - }) + _obj = cls.model_validate( + { + "resource": ( + ResourceReference.from_dict(obj["resource"]) + if obj.get("resource") is not None + else None + ), + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_is_spot": ( + obj.get("worker_is_spot") if obj.get("worker_is_spot") is not None else False + ), + "scheduler_size": obj.get("scheduler_size"), + "n_workers": obj.get("n_workers") if obj.get("n_workers") is not None else 1, + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads") if obj.get("nthreads") is not None else 2, + "subdomain": obj.get("subdomain"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_list.py b/saturn_api/models/dask_cluster_list.py index 5bb873c..c1dba5d 100644 --- a/saturn_api/models/dask_cluster_list.py +++ b/saturn_api/models/dask_cluster_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.dask_cluster import DaskCluster -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.dask_cluster import DaskCluster + + class DaskClusterList(BaseModel): """ DaskClusterList - """ # noqa: E501 + """ # noqa: E501 + dask_clusters: List[DaskCluster] = Field(description="List of dask clusters.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class DaskClusterList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "dask_clusters", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "dask_clusters", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_dask_clusters in self.dask_clusters: if _item_dask_clusters: _items.append(_item_dask_clusters.to_dict()) - _dict['dask_clusters'] = _items + _dict["dask_clusters"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "dask_clusters": [DaskCluster.from_dict(_item) for _item in obj["dask_clusters"]] if obj.get("dask_clusters") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "dask_clusters": ( + [DaskCluster.from_dict(_item) for _item in obj["dask_clusters"]] + if obj.get("dask_clusters") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_nested.py b/saturn_api/models/dask_cluster_nested.py index ef7953b..d5bb4dd 100644 --- a/saturn_api/models/dask_cluster_nested.py +++ b/saturn_api/models/dask_cluster_nested.py @@ -1,57 +1,99 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from typing_extensions import Self + class DaskClusterNested(BaseModel): """ DaskClusterNested - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the dask cluster.") name: StrictStr = Field(description="Name of the resource the dask cluster is attached to.") - resource_type: Literal['dask'] - tags: Optional[Dict[str, StrictStr]] = Field(description="Descriptive tags for the dask cluster.") + resource_type: Literal["dask"] + tags: Optional[Dict[str, StrictStr]] = Field( + description="Descriptive tags for the dask cluster." + ) worker_size: StrictStr = Field(description="Instance size of the dask workers.") - worker_size_display: StrictStr = Field(description="Description of the instance size for the workers.") + worker_size_display: StrictStr = Field( + description="Description of the instance size for the workers." + ) worker_is_spot: StrictBool = Field(description="Enables spot instances for the dask workers.") scheduler_size: StrictStr = Field(description="Instance size of the dask scheduler.") - scheduler_size_display: StrictStr = Field(description="Description of the instance size for the scheduler.") + scheduler_size_display: StrictStr = Field( + description="Description of the instance size for the scheduler." + ) n_workers: StrictInt = Field(description="Number of dask workers.") nprocs: StrictInt = Field(description="Number of processes per worker.") nthreads: StrictInt = Field(description="Number of threads per process.") scheduler_url: StrictStr = Field(description="Internal address for the dask scheduler") subdomain: StrictStr = Field(description="Subdomain for the dask dashboard.") - image: StrictStr = Field(description="Image for the dask cluster and resource it is attached to.") + image: StrictStr = Field( + description="Image for the dask cluster and resource it is attached to." + ) created_at: StrictStr = Field(description="Creation timestamp.") status: StrictStr = Field(description="Current status of the dask cluster.") - warnings: Optional[List[StrictStr]] = Field(default=None, description="Messages with warnings about the state of the dask cluster.") - errors: Optional[List[StrictStr]] = Field(default=None, description="Messages with errors about the state of the dask cluster.") + warnings: Optional[List[StrictStr]] = Field( + default=None, description="Messages with warnings about the state of the dask cluster." + ) + errors: Optional[List[StrictStr]] = Field( + default=None, description="Messages with errors about the state of the dask cluster." + ) url: StrictStr = Field(description="External URL for the dask dashboard.") - __properties: ClassVar[List[str]] = ["id", "name", "resource_type", "tags", "worker_size", "worker_size_display", "worker_is_spot", "scheduler_size", "scheduler_size_display", "n_workers", "nprocs", "nthreads", "scheduler_url", "subdomain", "image", "created_at", "status", "warnings", "errors", "url"] - - @field_validator('resource_type') + __properties: ClassVar[List[str]] = [ + "id", + "name", + "resource_type", + "tags", + "worker_size", + "worker_size_display", + "worker_is_spot", + "scheduler_size", + "scheduler_size_display", + "n_workers", + "nprocs", + "nthreads", + "scheduler_url", + "subdomain", + "image", + "created_at", + "status", + "warnings", + "errors", + "url", + ] + + @field_validator("resource_type") def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['dask']): + if value not in set(["dask"]): raise ValueError("must be one of enum values ('dask')") return value @@ -61,7 +103,6 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -104,26 +145,28 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "resource_type", - "tags", - "worker_size", - "worker_size_display", - "worker_is_spot", - "scheduler_size", - "scheduler_size_display", - "n_workers", - "nprocs", - "nthreads", - "scheduler_url", - "subdomain", - "image", - "created_at", - "status", - "url", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "resource_type", + "tags", + "worker_size", + "worker_size_display", + "worker_is_spot", + "scheduler_size", + "scheduler_size_display", + "n_workers", + "nprocs", + "nthreads", + "scheduler_url", + "subdomain", + "image", + "created_at", + "status", + "url", + ] + ) _dict = self.model_dump( by_alias=True, @@ -133,7 +176,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None return _dict @@ -146,28 +189,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "resource_type": obj.get("resource_type"), - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_size_display": obj.get("worker_size_display"), - "worker_is_spot": obj.get("worker_is_spot"), - "scheduler_size": obj.get("scheduler_size"), - "scheduler_size_display": obj.get("scheduler_size_display"), - "n_workers": obj.get("n_workers"), - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads"), - "scheduler_url": obj.get("scheduler_url"), - "subdomain": obj.get("subdomain"), - "image": obj.get("image"), - "created_at": obj.get("created_at"), - "status": obj.get("status"), - "warnings": obj.get("warnings"), - "errors": obj.get("errors"), - "url": obj.get("url") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_size_display": obj.get("worker_size_display"), + "worker_is_spot": obj.get("worker_is_spot"), + "scheduler_size": obj.get("scheduler_size"), + "scheduler_size_display": obj.get("scheduler_size_display"), + "n_workers": obj.get("n_workers"), + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads"), + "scheduler_url": obj.get("scheduler_url"), + "subdomain": obj.get("subdomain"), + "image": obj.get("image"), + "created_at": obj.get("created_at"), + "status": obj.get("status"), + "warnings": obj.get("warnings"), + "errors": obj.get("errors"), + "url": obj.get("url"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_runtime_summary.py b/saturn_api/models/dask_cluster_runtime_summary.py index 56f6e03..86190d9 100644 --- a/saturn_api/models/dask_cluster_runtime_summary.py +++ b/saturn_api/models/dask_cluster_runtime_summary.py @@ -1,37 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.condition import Condition from saturn_api.models.dask_worker_summary import DaskWorkerSummary from saturn_api.models.deployment_runtime_summary import DeploymentRuntimeSummary from saturn_api.models.pod_runtime_summary import PodRuntimeSummary from saturn_api.models.pod_status import PodStatus -from typing import Literal, Optional, Set -from typing_extensions import Self + class DaskClusterRuntimeSummary(BaseModel): """ DaskClusterRuntimeSummary - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr namespace: StrictStr uid: StrictStr @@ -47,7 +49,23 @@ class DaskClusterRuntimeSummary(BaseModel): scheduler_summary: PodRuntimeSummary worker_summary: DaskWorkerSummary errors: List[StrictStr] - __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "kubecluster_summary", "scheduler_summary", "worker_summary", "errors"] + __properties: ClassVar[List[str]] = [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "status", + "kubecluster_summary", + "scheduler_summary", + "worker_summary", + "errors", + ] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +73,6 @@ class DaskClusterRuntimeSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,22 +111,24 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "kubecluster_summary", - "scheduler_summary", - "worker_summary", - "errors", - ]) + excluded_fields: Set[str] = set( + [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "kubecluster_summary", + "scheduler_summary", + "worker_summary", + "errors", + ] + ) _dict = self.model_dump( by_alias=True, @@ -122,35 +141,35 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict['conditions'] = _items + _dict["conditions"] = _items # override the default output from pydantic by calling `to_dict()` of kubecluster_summary if self.kubecluster_summary: - _dict['kubecluster_summary'] = self.kubecluster_summary.to_dict() + _dict["kubecluster_summary"] = self.kubecluster_summary.to_dict() # override the default output from pydantic by calling `to_dict()` of scheduler_summary if self.scheduler_summary: - _dict['scheduler_summary'] = self.scheduler_summary.to_dict() + _dict["scheduler_summary"] = self.scheduler_summary.to_dict() # override the default output from pydantic by calling `to_dict()` of worker_summary if self.worker_summary: - _dict['worker_summary'] = self.worker_summary.to_dict() + _dict["worker_summary"] = self.worker_summary.to_dict() # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict['controller_uid'] = None + _dict["controller_uid"] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict['controller_kind'] = None + _dict["controller_kind"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None + _dict["deleted_at"] = None return _dict @@ -163,23 +182,39 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "kubecluster_summary": DeploymentRuntimeSummary.from_dict(obj["kubecluster_summary"]) if obj.get("kubecluster_summary") is not None else None, - "scheduler_summary": PodRuntimeSummary.from_dict(obj["scheduler_summary"]) if obj.get("scheduler_summary") is not None else None, - "worker_summary": DaskWorkerSummary.from_dict(obj["worker_summary"]) if obj.get("worker_summary") is not None else None, - "errors": obj.get("errors") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": ( + [Condition.from_dict(_item) for _item in obj["conditions"]] + if obj.get("conditions") is not None + else None + ), + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "kubecluster_summary": ( + DeploymentRuntimeSummary.from_dict(obj["kubecluster_summary"]) + if obj.get("kubecluster_summary") is not None + else None + ), + "scheduler_summary": ( + PodRuntimeSummary.from_dict(obj["scheduler_summary"]) + if obj.get("scheduler_summary") is not None + else None + ), + "worker_summary": ( + DaskWorkerSummary.from_dict(obj["worker_summary"]) + if obj.get("worker_summary") is not None + else None + ), + "errors": obj.get("errors"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_scale.py b/saturn_api/models/dask_cluster_scale.py index 644ac71..02589b8 100644 --- a/saturn_api/models/dask_cluster_scale.py +++ b/saturn_api/models/dask_cluster_scale.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class DaskClusterScale(BaseModel): """ DaskClusterScale - """ # noqa: E501 - n: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of dask workers to scale to.") + """ # noqa: E501 + + n: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Number of dask workers to scale to." + ) __properties: ClassVar[List[str]] = ["n"] model_config = ConfigDict( @@ -36,7 +38,6 @@ class DaskClusterScale(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "n": obj.get("n") - }) + _obj = cls.model_validate({"n": obj.get("n")}) return _obj - - diff --git a/saturn_api/models/dask_cluster_server_options.py b/saturn_api/models/dask_cluster_server_options.py index 5b9480f..6e9992c 100644 --- a/saturn_api/models/dask_cluster_server_options.py +++ b/saturn_api/models/dask_cluster_server_options.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.server_options_size import ServerOptionsSize -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.server_options_size import ServerOptionsSize + + class DaskClusterServerOptions(BaseModel): """ DaskClusterServerOptions - """ # noqa: E501 - server_options: ServerOptionsSize = Field(description="Configuration options for dask clusters.") + """ # noqa: E501 + + server_options: ServerOptionsSize = Field( + description="Configuration options for dask clusters." + ) __properties: ClassVar[List[str]] = ["server_options"] model_config = ConfigDict( @@ -36,7 +40,6 @@ class DaskClusterServerOptions(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict['server_options'] = self.server_options.to_dict() + _dict["server_options"] = self.server_options.to_dict() return _dict @classmethod @@ -83,9 +85,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "server_options": ServerOptionsSize.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None - }) + _obj = cls.model_validate( + { + "server_options": ( + ServerOptionsSize.from_dict(obj["server_options"]) + if obj.get("server_options") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/dask_cluster_update.py b/saturn_api/models/dask_cluster_update.py index 13e1ae2..d7b336e 100644 --- a/saturn_api/models/dask_cluster_update.py +++ b/saturn_api/models/dask_cluster_update.py @@ -1,40 +1,62 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class DaskClusterUpdate(BaseModel): """ DaskClusterUpdate - """ # noqa: E501 - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the dask cluster.") - worker_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask workers.") - worker_is_spot: Optional[StrictBool] = Field(default=None, description="Enables spot instances for the dask workers.") - scheduler_size: Optional[StrictStr] = Field(default=None, description="Instance size of the dask scheduler.") + """ # noqa: E501 + + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the dask cluster." + ) + worker_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the dask workers." + ) + worker_is_spot: Optional[StrictBool] = Field( + default=None, description="Enables spot instances for the dask workers." + ) + scheduler_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the dask scheduler." + ) n_workers: Optional[StrictInt] = Field(default=None, description="Number of dask workers.") nprocs: Optional[StrictInt] = Field(default=None, description="Number of processes per worker.") - nthreads: Optional[StrictInt] = Field(default=None, description="Number of threads per process.") - subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the dask dashboard.") - __properties: ClassVar[List[str]] = ["tags", "worker_size", "worker_is_spot", "scheduler_size", "n_workers", "nprocs", "nthreads", "subdomain"] + nthreads: Optional[StrictInt] = Field( + default=None, description="Number of threads per process." + ) + subdomain: Optional[StrictStr] = Field( + default=None, description="Subdomain for the dask dashboard." + ) + __properties: ClassVar[List[str]] = [ + "tags", + "worker_size", + "worker_is_spot", + "scheduler_size", + "n_workers", + "nprocs", + "nthreads", + "subdomain", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +64,6 @@ class DaskClusterUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +88,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,12 +98,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict['subdomain'] = None + _dict["subdomain"] = None return _dict @@ -96,16 +116,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "tags": obj.get("tags"), - "worker_size": obj.get("worker_size"), - "worker_is_spot": obj.get("worker_is_spot"), - "scheduler_size": obj.get("scheduler_size"), - "n_workers": obj.get("n_workers"), - "nprocs": obj.get("nprocs"), - "nthreads": obj.get("nthreads"), - "subdomain": obj.get("subdomain") - }) + _obj = cls.model_validate( + { + "tags": obj.get("tags"), + "worker_size": obj.get("worker_size"), + "worker_is_spot": obj.get("worker_is_spot"), + "scheduler_size": obj.get("scheduler_size"), + "n_workers": obj.get("n_workers"), + "nprocs": obj.get("nprocs"), + "nthreads": obj.get("nthreads"), + "subdomain": obj.get("subdomain"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_components.py b/saturn_api/models/dask_components.py index cf43eea..9bab600 100644 --- a/saturn_api/models/dask_components.py +++ b/saturn_api/models/dask_components.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class DaskComponents(str, Enum): """ allowed enum values """ - KUBECLUSTER = 'kubecluster' - SCHEDULER = 'scheduler' - WORKER = 'worker' + KUBECLUSTER = "kubecluster" + SCHEDULER = "scheduler" + WORKER = "worker" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DaskComponents from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/dask_worker_runtime_summary_list.py b/saturn_api/models/dask_worker_runtime_summary_list.py index 5216e2e..fc04da4 100644 --- a/saturn_api/models/dask_worker_runtime_summary_list.py +++ b/saturn_api/models/dask_worker_runtime_summary_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.pod_runtime_summary import PodRuntimeSummary -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.pod_runtime_summary import PodRuntimeSummary + + class DaskWorkerRuntimeSummaryList(BaseModel): """ DaskWorkerRuntimeSummaryList - """ # noqa: E501 + """ # noqa: E501 + workers: List[PodRuntimeSummary] = Field(description="List of worker pod runtime summaries.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class DaskWorkerRuntimeSummaryList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "workers", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "workers", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_workers in self.workers: if _item_workers: _items.append(_item_workers.to_dict()) - _dict['workers'] = _items + _dict["workers"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "workers": [PodRuntimeSummary.from_dict(_item) for _item in obj["workers"]] if obj.get("workers") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "workers": ( + [PodRuntimeSummary.from_dict(_item) for _item in obj["workers"]] + if obj.get("workers") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/dask_worker_summary.py b/saturn_api/models/dask_worker_summary.py index 31e3ade..672da17 100644 --- a/saturn_api/models/dask_worker_summary.py +++ b/saturn_api/models/dask_worker_summary.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class DaskWorkerSummary(BaseModel): """ DaskWorkerSummary - """ # noqa: E501 + """ # noqa: E501 + count: StrictInt pending_count: StrictInt running_count: StrictInt @@ -38,7 +39,6 @@ class DaskWorkerSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "count", - "pending_count", - "running_count", - "error_count", - ]) + excluded_fields: Set[str] = set( + [ + "count", + "pending_count", + "running_count", + "error_count", + ] + ) _dict = self.model_dump( by_alias=True, @@ -90,12 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "count": obj.get("count"), - "pending_count": obj.get("pending_count"), - "running_count": obj.get("running_count"), - "error_count": obj.get("error_count") - }) + _obj = cls.model_validate( + { + "count": obj.get("count"), + "pending_count": obj.get("pending_count"), + "running_count": obj.get("running_count"), + "error_count": obj.get("error_count"), + } + ) return _obj - - diff --git a/saturn_api/models/data_point.py b/saturn_api/models/data_point.py index e1afaaf..4add661 100644 --- a/saturn_api/models/data_point.py +++ b/saturn_api/models/data_point.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Literal, Optional, Set from typing_extensions import Self + class DataPoint(BaseModel): """ DataPoint - """ # noqa: E501 + """ # noqa: E501 + datetime: StrictStr = Field(description="Metric timestamp.") value: Union[StrictFloat, StrictInt] = Field(description="Value of the data point.") __properties: ClassVar[List[str]] = ["datetime", "value"] @@ -36,7 +37,6 @@ class DataPoint(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,10 +63,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "datetime", - "value", - ]) + excluded_fields: Set[str] = set( + [ + "datetime", + "value", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +86,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "datetime": obj.get("datetime"), - "value": obj.get("value") - }) + _obj = cls.model_validate({"datetime": obj.get("datetime"), "value": obj.get("value")}) return _obj - - diff --git a/saturn_api/models/dataset.py b/saturn_api/models/dataset.py new file mode 100644 index 0000000..9293e6b --- /dev/null +++ b/saturn_api/models/dataset.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.artifact_kind import ArtifactKind +from saturn_api.models.artifact_status import ArtifactStatus + + +class Dataset(BaseModel): + """ + Dataset + """ # noqa: E501 + + id: StrictStr = Field(description="Dataset identifier.") + org_id: StrictStr = Field(description="Owning organisation ID.") + name: StrictStr = Field(description="Human-readable dataset name.") + kind: ArtifactKind + status: ArtifactStatus + location: StrictStr = Field(description="Storage location URI (sf:/).") + metadata: Optional[Dict[str, Any]] = Field( + description="Arbitrary metadata blob (schema_type, row_count, etc.)." + ) + created_at: StrictStr = Field(description="Creation timestamp (UTC).") + __properties: ClassVar[List[str]] = [ + "id", + "org_id", + "name", + "kind", + "status", + "location", + "metadata", + "created_at", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Dataset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "id", + "org_id", + "name", + "location", + "metadata", + "created_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Dataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "name": obj.get("name"), + "kind": obj.get("kind"), + "status": obj.get("status"), + "location": obj.get("location"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at"), + } + ) + return _obj diff --git a/saturn_api/models/dataset_create.py b/saturn_api/models/dataset_create.py new file mode 100644 index 0000000..82bb576 --- /dev/null +++ b/saturn_api/models/dataset_create.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class DatasetCreate(BaseModel): + """ + DatasetCreate + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Human-readable name for the dataset." + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Optional metadata blob: schema_type, description, row_count, format hints, etc. Platform treats dataset bytes as opaque — format details live here.", + ) + __properties: ClassVar[List[str]] = ["name", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatasetCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatasetCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "metadata": obj.get("metadata")}) + return _obj diff --git a/saturn_api/models/dataset_list.py b/saturn_api/models/dataset_list.py new file mode 100644 index 0000000..795fe0c --- /dev/null +++ b/saturn_api/models/dataset_list.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.dataset import Dataset + + +class DatasetList(BaseModel): + """ + DatasetList + """ # noqa: E501 + + datasets: List[Dataset] = Field(description="List of datasets.") + prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") + next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") + __properties: ClassVar[List[str]] = ["datasets", "prev_key", "next_key"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatasetList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "datasets", + "prev_key", + "next_key", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in datasets (list) + _items = [] + if self.datasets: + for _item_datasets in self.datasets: + if _item_datasets: + _items.append(_item_datasets.to_dict()) + _dict["datasets"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatasetList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "datasets": ( + [Dataset.from_dict(_item) for _item in obj["datasets"]] + if obj.get("datasets") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) + return _obj diff --git a/saturn_api/models/default_images.py b/saturn_api/models/default_images.py index 60f2b2c..3421599 100644 --- a/saturn_api/models/default_images.py +++ b/saturn_api/models/default_images.py @@ -1,35 +1,43 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.image_tag import ImageTag -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.image_tag import ImageTag + + class DefaultImages(BaseModel): """ DefaultImages - """ # noqa: E501 - cpu: Optional[ImageTag] = Field(default=None, description="Default image tag for CPU instances.", alias="CPU") - nvidia: Optional[ImageTag] = Field(default=None, description="Default image tag for NVIDIA GPU instances.", alias="NVIDIA") - amd: Optional[ImageTag] = Field(default=None, description="Default image tag for AMD GPU instances.", alias="AMD") + """ # noqa: E501 + + cpu: Optional[ImageTag] = Field( + default=None, description="Default image tag for CPU instances.", alias="CPU" + ) + nvidia: Optional[ImageTag] = Field( + default=None, description="Default image tag for NVIDIA GPU instances.", alias="NVIDIA" + ) + amd: Optional[ImageTag] = Field( + default=None, description="Default image tag for AMD GPU instances.", alias="AMD" + ) __properties: ClassVar[List[str]] = ["CPU", "NVIDIA", "AMD"] model_config = ConfigDict( @@ -38,7 +46,6 @@ class DefaultImages(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,13 +79,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of cpu if self.cpu: - _dict['CPU'] = self.cpu.to_dict() + _dict["CPU"] = self.cpu.to_dict() # override the default output from pydantic by calling `to_dict()` of nvidia if self.nvidia: - _dict['NVIDIA'] = self.nvidia.to_dict() + _dict["NVIDIA"] = self.nvidia.to_dict() # override the default output from pydantic by calling `to_dict()` of amd if self.amd: - _dict['AMD'] = self.amd.to_dict() + _dict["AMD"] = self.amd.to_dict() return _dict @classmethod @@ -91,11 +97,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "CPU": ImageTag.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, - "NVIDIA": ImageTag.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None, - "AMD": ImageTag.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None - }) + _obj = cls.model_validate( + { + "CPU": ImageTag.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, + "NVIDIA": ( + ImageTag.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None + ), + "AMD": ImageTag.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None, + } + ) return _obj - - diff --git a/saturn_api/models/default_sizes.py b/saturn_api/models/default_sizes.py index 6543648..742b028 100644 --- a/saturn_api/models/default_sizes.py +++ b/saturn_api/models/default_sizes.py @@ -1,35 +1,43 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.instance_size import InstanceSize -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.instance_size import InstanceSize + + class DefaultSizes(BaseModel): """ DefaultSizes - """ # noqa: E501 - cpu: Optional[InstanceSize] = Field(default=None, description="Default CPU instance size.", alias="CPU") - nvidia: Optional[InstanceSize] = Field(default=None, description="Default NVIDIA GPU instance size.", alias="NVIDIA") - amd: Optional[InstanceSize] = Field(default=None, description="Default AMD GPU instance size.", alias="AMD") + """ # noqa: E501 + + cpu: Optional[InstanceSize] = Field( + default=None, description="Default CPU instance size.", alias="CPU" + ) + nvidia: Optional[InstanceSize] = Field( + default=None, description="Default NVIDIA GPU instance size.", alias="NVIDIA" + ) + amd: Optional[InstanceSize] = Field( + default=None, description="Default AMD GPU instance size.", alias="AMD" + ) __properties: ClassVar[List[str]] = ["CPU", "NVIDIA", "AMD"] model_config = ConfigDict( @@ -38,7 +46,6 @@ class DefaultSizes(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,13 +79,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of cpu if self.cpu: - _dict['CPU'] = self.cpu.to_dict() + _dict["CPU"] = self.cpu.to_dict() # override the default output from pydantic by calling `to_dict()` of nvidia if self.nvidia: - _dict['NVIDIA'] = self.nvidia.to_dict() + _dict["NVIDIA"] = self.nvidia.to_dict() # override the default output from pydantic by calling `to_dict()` of amd if self.amd: - _dict['AMD'] = self.amd.to_dict() + _dict["AMD"] = self.amd.to_dict() return _dict @classmethod @@ -91,11 +97,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "CPU": InstanceSize.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, - "NVIDIA": InstanceSize.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None, - "AMD": InstanceSize.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None - }) + _obj = cls.model_validate( + { + "CPU": InstanceSize.from_dict(obj["CPU"]) if obj.get("CPU") is not None else None, + "NVIDIA": ( + InstanceSize.from_dict(obj["NVIDIA"]) if obj.get("NVIDIA") is not None else None + ), + "AMD": InstanceSize.from_dict(obj["AMD"]) if obj.get("AMD") is not None else None, + } + ) return _obj - - diff --git a/saturn_api/models/deployment.py b/saturn_api/models/deployment.py index f811690..5c78c33 100644 --- a/saturn_api/models/deployment.py +++ b/saturn_api/models/deployment.py @@ -1,72 +1,134 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) +from typing_extensions import Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.dask_cluster_nested import DaskClusterNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.image_tag import ImageTag from saturn_api.models.owner import Owner -from typing import Literal, Optional, Set -from typing_extensions import Self + class Deployment(BaseModel): """ Deployment - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the deployment.") name: StrictStr = Field(description="Name of the deployment.") owner: Owner = Field(description="Owner of the deployment.") command: StrictStr = Field(description="Command that runs on start.") description: StrictStr = Field(description="Description of the deployment.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the deployment.") + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the deployment." + ) instance_size: StrictStr = Field(description="Instance size of the deployment.") image_tag: ImageTag = Field(description="Image tag that is attached to the deployment.") - extra_packages: Optional[ExtraPackages] = Field(description="Addtitional packages to install on start.") + extra_packages: Optional[ExtraPackages] = Field( + description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, Dict[str, StrictStr]]] = Field( + default=None, description="User-defined config files written to $HOME at pod startup." + ) scale: StrictInt = Field(description="Number of pod replicas.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") - environment_variables: Dict[str, StrictStr] = Field(description="Mapping of environment variable keys to values.") + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script that runs on start before the primary command." + ) + environment_variables: Dict[str, StrictStr] = Field( + description="Mapping of environment variable keys to values." + ) working_dir: StrictStr = Field(description="Initial working directory.") start_ssh: StrictBool = Field(description="Enable SSH access on the deployment.") is_spot: StrictBool = Field(description="Enables running on spot instance sizes.") - healthcheck: Optional[StrictStr] = Field(default=None, description="Healthcheck path on the deployment's primary port.") + healthcheck: Optional[StrictStr] = Field( + default=None, description="Healthcheck path on the deployment's primary port." + ) subdomain: StrictStr = Field(description="Subdomain for the deployment URL.") start_dind: StrictBool = Field(description="Enables docker-in-docker.") last_deploy: StrictStr = Field(description="Last started timestamp.") k8s_name: StrictStr = Field(description="Unique name for associated kubernetes objects.") created_at: StrictStr = Field(description="Creation timestamp") updated_at: StrictStr = Field(description="Update timestamp.") - require_restart: StrictBool = Field(description="True if an update was applied that requires restart to take effect.") - resource_type: Literal['deployment'] + require_restart: StrictBool = Field( + description="True if an update was applied that requires restart to take effect." + ) + resource_type: Literal["deployment"] size_display: StrictStr = Field(description="Description of the instance size.") - dask_cluster: Optional[DaskClusterNested] = Field(default=None, description="Dask cluster attached to the deployment.") + dask_cluster: Optional[DaskClusterNested] = Field( + default=None, description="Dask cluster attached to the deployment." + ) status: StrictStr = Field(description="Current status of the deployment.") running_count: StrictInt = Field(description="Number of running pods.") debug_mode: StrictBool = Field(description="True if deployment is running in debug mode.") url: StrictStr = Field(description="External URL for the deployment.") - ssh_url: Optional[StrictStr] = Field(default=None, description="External SSH URL for the deployment.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "command", "description", "tags", "instance_size", "image_tag", "extra_packages", "scale", "start_script", "environment_variables", "working_dir", "start_ssh", "is_spot", "healthcheck", "subdomain", "start_dind", "last_deploy", "k8s_name", "created_at", "updated_at", "require_restart", "resource_type", "size_display", "dask_cluster", "status", "running_count", "debug_mode", "url", "ssh_url"] + ssh_url: Optional[StrictStr] = Field( + default=None, description="External SSH URL for the deployment." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "command", + "description", + "tags", + "instance_size", + "image_tag", + "extra_packages", + "config_files", + "scale", + "start_script", + "environment_variables", + "working_dir", + "start_ssh", + "is_spot", + "healthcheck", + "subdomain", + "start_dind", + "last_deploy", + "k8s_name", + "created_at", + "updated_at", + "require_restart", + "resource_type", + "size_display", + "dask_cluster", + "status", + "running_count", + "debug_mode", + "url", + "ssh_url", + ] - @field_validator('resource_type') + @field_validator("resource_type") def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['deployment']): + if value not in set(["deployment"]): raise ValueError("must be one of enum values ('deployment')") return value @@ -76,7 +138,6 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -130,39 +191,43 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "command", - "description", - "instance_size", - "image_tag", - "extra_packages", - "scale", - "start_script", - "environment_variables", - "working_dir", - "start_ssh", - "is_spot", - "healthcheck", - "subdomain", - "start_dind", - "last_deploy", - "k8s_name", - "created_at", - "updated_at", - "require_restart", - "resource_type", - "size_display", - "dask_cluster", - "status", - "running_count", - "debug_mode", - "url", - "ssh_url", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "command", + "description", + "instance_size", + "image_tag", + "extra_packages", + "config_files", + "scale", + "start_script", + "environment_variables", + "working_dir", + "start_ssh", + "is_spot", + "healthcheck", + "subdomain", + "start_dind", + "last_deploy", + "k8s_name", + "created_at", + "updated_at", + "require_restart", + "resource_type", + "size_display", + "dask_cluster", + "status", + "running_count", + "debug_mode", + "url", + "ssh_url", + ] + ) _dict = self.model_dump( by_alias=True, @@ -171,30 +236,35 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image_tag if self.image_tag: - _dict['image_tag'] = self.image_tag.to_dict() + _dict["image_tag"] = self.image_tag.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict['dask_cluster'] = self.dask_cluster.to_dict() + _dict["dask_cluster"] = self.dask_cluster.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None return _dict @@ -207,39 +277,52 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "command": obj.get("command"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_tag": ImageTag.from_dict(obj["image_tag"]) if obj.get("image_tag") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "scale": obj.get("scale"), - "start_script": obj.get("start_script"), - "environment_variables": obj.get("environment_variables"), - "working_dir": obj.get("working_dir"), - "start_ssh": obj.get("start_ssh"), - "is_spot": obj.get("is_spot"), - "healthcheck": obj.get("healthcheck"), - "subdomain": obj.get("subdomain"), - "start_dind": obj.get("start_dind"), - "last_deploy": obj.get("last_deploy"), - "k8s_name": obj.get("k8s_name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "require_restart": obj.get("require_restart"), - "resource_type": obj.get("resource_type"), - "size_display": obj.get("size_display"), - "dask_cluster": DaskClusterNested.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, - "status": obj.get("status"), - "running_count": obj.get("running_count"), - "debug_mode": obj.get("debug_mode"), - "url": obj.get("url"), - "ssh_url": obj.get("ssh_url") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "command": obj.get("command"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_tag": ( + ImageTag.from_dict(obj["image_tag"]) + if obj.get("image_tag") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": obj.get("config_files"), + "scale": obj.get("scale"), + "start_script": obj.get("start_script"), + "environment_variables": obj.get("environment_variables"), + "working_dir": obj.get("working_dir"), + "start_ssh": obj.get("start_ssh"), + "is_spot": obj.get("is_spot"), + "healthcheck": obj.get("healthcheck"), + "subdomain": obj.get("subdomain"), + "start_dind": obj.get("start_dind"), + "last_deploy": obj.get("last_deploy"), + "k8s_name": obj.get("k8s_name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "require_restart": obj.get("require_restart"), + "resource_type": obj.get("resource_type"), + "size_display": obj.get("size_display"), + "dask_cluster": ( + DaskClusterNested.from_dict(obj["dask_cluster"]) + if obj.get("dask_cluster") is not None + else None + ), + "status": obj.get("status"), + "running_count": obj.get("running_count"), + "debug_mode": obj.get("debug_mode"), + "url": obj.get("url"), + "ssh_url": obj.get("ssh_url"), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_create.py b/saturn_api/models/deployment_create.py index d03ba3d..3f9c394 100644 --- a/saturn_api/models/deployment_create.py +++ b/saturn_api/models/deployment_create.py @@ -1,56 +1,117 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class DeploymentCreate(BaseModel): """ DeploymentCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the deployment.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the deployment.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the deployment.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the deployment.") - instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the deployment.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default="", description="Description of the deployment." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the deployment." + ) + instance_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the deployment." + ) image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") - environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments for the deployment.") - extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script to run on start before the primary command.") - working_dir: Optional[StrictStr] = Field(default='/home/jovyan/workspace', description="Initial working directory for the deployment.") - is_spot: Optional[StrictBool] = Field(default=False, description="Enables running on spot instance sizes.") + image_enforce_trusted: Optional[StrictBool] = Field( + default=True, description="Enable image trust validation before attaching." + ) + environment_variables: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Mapping of environment variable keys to values." + ) + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( + default=None, description="List of external repo attachments for the deployment." + ) + extra_packages: Optional[ExtraPackages] = Field( + default=None, description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, ConfigFileEntry]] = Field( + default=None, + description="User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode.", + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script to run on start before the primary command." + ) + working_dir: Optional[StrictStr] = Field( + default="/home/jovyan/workspace", + description="Initial working directory for the deployment.", + ) + is_spot: Optional[StrictBool] = Field( + default=False, description="Enables running on spot instance sizes." + ) start_dind: Optional[StrictBool] = Field(default=False, description="Enables docker-in-docker.") - command: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Command that runs on start.") - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Number of pod replicas.") - subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the deployment URL.") - healthcheck: Optional[StrictStr] = Field(default=None, description="Healthcheck path on the deployment's primary port.") - start_ssh: Optional[StrictBool] = Field(default=False, description="Enable SSH access on the deployment.") - __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "instance_size", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "is_spot", "start_dind", "command", "scale", "subdomain", "healthcheck", "start_ssh"] + command: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Command that runs on start." + ) + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( + default=1, description="Number of pod replicas." + ) + subdomain: Optional[StrictStr] = Field( + default=None, description="Subdomain for the deployment URL." + ) + healthcheck: Optional[StrictStr] = Field( + default=None, description="Healthcheck path on the deployment's primary port." + ) + start_ssh: Optional[StrictBool] = Field( + default=False, description="Enable SSH access on the deployment." + ) + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "tags", + "instance_size", + "image_uri", + "image_tag_id", + "image_enforce_trusted", + "environment_variables", + "external_repo_attachments", + "extra_packages", + "config_files", + "start_script", + "working_dir", + "is_spot", + "start_dind", + "command", + "scale", + "subdomain", + "healthcheck", + "start_ssh", + ] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +119,6 @@ class DeploymentCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,8 +143,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -93,46 +152,61 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in external_repo_attachments (list) _items = [] if self.external_repo_attachments: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if environment_variables (nullable) is None # and model_fields_set contains the field if self.environment_variables is None and "environment_variables" in self.model_fields_set: - _dict['environment_variables'] = None + _dict["environment_variables"] = None # set to None if external_repo_attachments (nullable) is None # and model_fields_set contains the field - if self.external_repo_attachments is None and "external_repo_attachments" in self.model_fields_set: - _dict['external_repo_attachments'] = None + if ( + self.external_repo_attachments is None + and "external_repo_attachments" in self.model_fields_set + ): + _dict["external_repo_attachments"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if healthcheck (nullable) is None # and model_fields_set contains the field if self.healthcheck is None and "healthcheck" in self.model_fields_set: - _dict['healthcheck'] = None + _dict["healthcheck"] = None return _dict @@ -145,28 +219,57 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description") if obj.get("description") is not None else '', - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir") if obj.get("working_dir") is not None else '/home/jovyan/workspace', - "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, - "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "subdomain": obj.get("subdomain"), - "healthcheck": obj.get("healthcheck"), - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description") if obj.get("description") is not None else "", + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": ( + obj.get("image_enforce_trusted") + if obj.get("image_enforce_trusted") is not None + else True + ), + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": ( + [ + ExternalRepoAttachmentNested.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "working_dir": ( + obj.get("working_dir") + if obj.get("working_dir") is not None + else "/home/jovyan/workspace" + ), + "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, + "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "subdomain": obj.get("subdomain"), + "healthcheck": obj.get("healthcheck"), + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + } + ) return _obj - - diff --git a/saturn_api/models/deployment_list.py b/saturn_api/models/deployment_list.py index aa505d4..bf948c9 100644 --- a/saturn_api/models/deployment_list.py +++ b/saturn_api/models/deployment_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.deployment import Deployment -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.deployment import Deployment + + class DeploymentList(BaseModel): """ DeploymentList - """ # noqa: E501 + """ # noqa: E501 + deployments: List[Deployment] = Field(description="List of deployments.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class DeploymentList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "deployments", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "deployments", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_deployments in self.deployments: if _item_deployments: _items.append(_item_deployments.to_dict()) - _dict['deployments'] = _items + _dict["deployments"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "deployments": [Deployment.from_dict(_item) for _item in obj["deployments"]] if obj.get("deployments") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "deployments": ( + [Deployment.from_dict(_item) for _item in obj["deployments"]] + if obj.get("deployments") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_recipe.py b/saturn_api/models/deployment_recipe.py index ac81720..455c9db 100644 --- a/saturn_api/models/deployment_recipe.py +++ b/saturn_api/models/deployment_recipe.py @@ -1,43 +1,45 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.deployment_spec import DeploymentSpec from saturn_api.models.resource_state import ResourceState -from typing import Literal, Optional, Set -from typing_extensions import Self + class DeploymentRecipe(BaseModel): """ DeploymentRecipe - """ # noqa: E501 - schema_version: Optional[StrictStr] = '2025.10.01' - type: Literal['deployment'] + """ # noqa: E501 + + schema_version: Optional[StrictStr] = "2025.10.01" + type: Literal["deployment"] spec: DeploymentSpec state: Optional[ResourceState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['deployment']): + if value not in set(["deployment"]): raise ValueError("must be one of enum values ('deployment')") return value @@ -47,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,9 +74,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "state", - ]) + excluded_fields: Set[str] = set( + [ + "state", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +87,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict['spec'] = self.spec.to_dict() + _dict["spec"] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict['state'] = self.state.to_dict() + _dict["state"] = self.state.to_dict() return _dict @classmethod @@ -99,12 +102,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', - "type": obj.get("type"), - "spec": DeploymentSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, - "state": ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None - }) + _obj = cls.model_validate( + { + "schema_version": ( + obj.get("schema_version") + if obj.get("schema_version") is not None + else "2025.10.01" + ), + "type": obj.get("type"), + "spec": ( + DeploymentSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None + ), + "state": ( + ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_route_recipe.py b/saturn_api/models/deployment_route_recipe.py index c8a1345..8cd0fb7 100644 --- a/saturn_api/models/deployment_route_recipe.py +++ b/saturn_api/models/deployment_route_recipe.py @@ -1,45 +1,47 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class DeploymentRouteRecipe(BaseModel): """ DeploymentRouteRecipe - """ # noqa: E501 - subdomain: Optional[StrictStr] = '' + """ # noqa: E501 + + subdomain: Optional[StrictStr] = "" container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] - visibility: Literal['unauthenticated', 'account', 'org', 'owner'] | None = None + visibility: Literal["unauthenticated", "account", "org", "owner"] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator('visibility') + @field_validator("visibility") def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['unauthenticated', 'account', 'org', 'owner']): - raise ValueError("must be one of enum values ('unauthenticated', 'account', 'org', 'owner')") + if value not in set(["unauthenticated", "account", "org", "owner"]): + raise ValueError( + "must be one of enum values ('unauthenticated', 'account', 'org', 'owner')" + ) return value model_config = ConfigDict( @@ -48,7 +50,6 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -92,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else '', - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility") - }) + _obj = cls.model_validate( + { + "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else "", + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility"), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_runtime_summary.py b/saturn_api/models/deployment_runtime_summary.py index 2ea10f1..b1184b2 100644 --- a/saturn_api/models/deployment_runtime_summary.py +++ b/saturn_api/models/deployment_runtime_summary.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.condition import Condition from saturn_api.models.deployment_status import DeploymentStatus -from typing import Literal, Optional, Set -from typing_extensions import Self + class DeploymentRuntimeSummary(BaseModel): """ DeploymentRuntimeSummary - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr namespace: StrictStr uid: StrictStr @@ -43,7 +45,22 @@ class DeploymentRuntimeSummary(BaseModel): scale: StrictInt running_count: StrictInt active_count: StrictInt - __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "scale", "running_count", "active_count"] + __properties: ClassVar[List[str]] = [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "status", + "scale", + "running_count", + "active_count", + ] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +68,6 @@ class DeploymentRuntimeSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -89,21 +105,23 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "scale", - "running_count", - "active_count", - ]) + excluded_fields: Set[str] = set( + [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "scale", + "running_count", + "active_count", + ] + ) _dict = self.model_dump( by_alias=True, @@ -116,26 +134,26 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict['conditions'] = _items + _dict["conditions"] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict['controller_uid'] = None + _dict["controller_uid"] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict['controller_kind'] = None + _dict["controller_kind"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None + _dict["deleted_at"] = None return _dict @@ -148,22 +166,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "scale": obj.get("scale"), - "running_count": obj.get("running_count"), - "active_count": obj.get("active_count") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": ( + [Condition.from_dict(_item) for _item in obj["conditions"]] + if obj.get("conditions") is not None + else None + ), + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "scale": obj.get("scale"), + "running_count": obj.get("running_count"), + "active_count": obj.get("active_count"), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_server_info.py b/saturn_api/models/deployment_server_info.py index 34d7dd2..a5295c2 100644 --- a/saturn_api/models/deployment_server_info.py +++ b/saturn_api/models/deployment_server_info.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from saturn_api.models.default_images import DefaultImages from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.server_options_size import ServerOptionsSize -from typing import Literal, Optional, Set -from typing_extensions import Self + class DeploymentServerInfo(BaseModel): """ DeploymentServerInfo - """ # noqa: E501 + """ # noqa: E501 + server_options: ServerOptionsSize = Field(description="Configuration options for deployments.") default_images: DefaultImages = Field(description="Default images for deployments.") default_sizes: DefaultSizes = Field(description="Default instance sizes for deployments.") @@ -40,7 +42,6 @@ class DeploymentServerInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,13 +75,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict['server_options'] = self.server_options.to_dict() + _dict["server_options"] = self.server_options.to_dict() # override the default output from pydantic by calling `to_dict()` of default_images if self.default_images: - _dict['default_images'] = self.default_images.to_dict() + _dict["default_images"] = self.default_images.to_dict() # override the default output from pydantic by calling `to_dict()` of default_sizes if self.default_sizes: - _dict['default_sizes'] = self.default_sizes.to_dict() + _dict["default_sizes"] = self.default_sizes.to_dict() return _dict @classmethod @@ -93,11 +93,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "server_options": ServerOptionsSize.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None, - "default_images": DefaultImages.from_dict(obj["default_images"]) if obj.get("default_images") is not None else None, - "default_sizes": DefaultSizes.from_dict(obj["default_sizes"]) if obj.get("default_sizes") is not None else None - }) + _obj = cls.model_validate( + { + "server_options": ( + ServerOptionsSize.from_dict(obj["server_options"]) + if obj.get("server_options") is not None + else None + ), + "default_images": ( + DefaultImages.from_dict(obj["default_images"]) + if obj.get("default_images") is not None + else None + ), + "default_sizes": ( + DefaultSizes.from_dict(obj["default_sizes"]) + if obj.get("default_sizes") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_spec.py b/saturn_api/models/deployment_spec.py index 48c00e8..2cdfefb 100644 --- a/saturn_api/models/deployment_spec.py +++ b/saturn_api/models/deployment_spec.py @@ -1,41 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment from saturn_api.models.deployment_route_recipe import DeploymentRouteRecipe -from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe +from saturn_api.models.external_repo_attachment_recipe import ( + ExternalRepoAttachmentRecipe, +) from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe from saturn_api.models.image_tag_reference import ImageTagReference from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe -from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe +from saturn_api.models.shared_folder_attachment_recipe import ( + SharedFolderAttachmentRecipe, +) from saturn_api.models.viewer_recipe import ViewerRecipe -from typing import Literal, Optional, Set -from typing_extensions import Self + class DeploymentSpec(BaseModel): """ DeploymentSpec - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr owner: Optional[OwnerReference] = None description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None @@ -45,6 +58,7 @@ class DeploymentSpec(BaseModel): environment_variables: Optional[Dict[str, StrictStr]] = None working_directory: Optional[StrictStr] = None extra_packages: Optional[ExtraPackagesRecipe] = None + config_files: Optional[Dict[str, ConfigFileEntry]] = None start_script: Optional[StrictStr] = None token_scope: Optional[StrictStr] = None dask_cluster: Optional[DaskClusterAttachment] = None @@ -52,22 +66,47 @@ class DeploymentSpec(BaseModel): secrets: Optional[List[SecretAttachmentRecipe]] = None shared_folders: Optional[List[SharedFolderAttachmentRecipe]] = None start_dind: Optional[StrictBool] = None - status: Literal['stopped', 'running'] | None = None + status: Literal["stopped", "running"] | None = None command: Annotated[str, Field(min_length=1, strict=True)] scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1 start_ssh: Optional[StrictBool] = False use_spot_instance: Optional[StrictBool] = False routes: Optional[List[DeploymentRouteRecipe]] = None viewers: Optional[List[ViewerRecipe]] = None - __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "image", "instance_type", "environment_variables", "working_directory", "extra_packages", "start_script", "token_scope", "dask_cluster", "git_repositories", "secrets", "shared_folders", "start_dind", "status", "command", "scale", "start_ssh", "use_spot_instance", "routes", "viewers"] + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "tags", + "image", + "instance_type", + "environment_variables", + "working_directory", + "extra_packages", + "config_files", + "start_script", + "token_scope", + "dask_cluster", + "git_repositories", + "secrets", + "shared_folders", + "start_dind", + "status", + "command", + "scale", + "start_ssh", + "use_spot_instance", + "routes", + "viewers", + ] - @field_validator('status') + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['stopped', 'running']): + if value not in set(["stopped", "running"]): raise ValueError("must be one of enum values ('stopped', 'running')") return value @@ -77,7 +116,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -102,8 +140,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -112,70 +149,82 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict['image'] = self.image.to_dict() + _dict["image"] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict['dask_cluster'] = self.dask_cluster.to_dict() + _dict["dask_cluster"] = self.dask_cluster.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in git_repositories (list) _items = [] if self.git_repositories: for _item_git_repositories in self.git_repositories: if _item_git_repositories: _items.append(_item_git_repositories.to_dict()) - _dict['git_repositories'] = _items + _dict["git_repositories"] = _items # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) _items = [] if self.secrets: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict['secrets'] = _items + _dict["secrets"] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_folders (list) _items = [] if self.shared_folders: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict['shared_folders'] = _items + _dict["shared_folders"] = _items # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict['routes'] = _items + _dict["routes"] = _items # override the default output from pydantic by calling `to_dict()` of each item in viewers (list) _items = [] if self.viewers: for _item_viewers in self.viewers: if _item_viewers: _items.append(_item_viewers.to_dict()) - _dict['viewers'] = _items + _dict["viewers"] = _items # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if token_scope (nullable) is None # and model_fields_set contains the field if self.token_scope is None and "token_scope" in self.model_fields_set: - _dict['token_scope'] = None + _dict["token_scope"] = None # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None + _dict["status"] = None return _dict @@ -188,31 +237,83 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "tags": obj.get("tags"), - "image": ImageTagReference.from_dict(obj["image"]) if obj.get("image") is not None else None, - "instance_type": obj.get("instance_type"), - "environment_variables": obj.get("environment_variables"), - "working_directory": obj.get("working_directory"), - "extra_packages": ExtraPackagesRecipe.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "token_scope": obj.get("token_scope"), - "dask_cluster": DaskClusterAttachment.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, - "git_repositories": [ExternalRepoAttachmentRecipe.from_dict(_item) for _item in obj["git_repositories"]] if obj.get("git_repositories") is not None else None, - "secrets": [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, - "shared_folders": [SharedFolderAttachmentRecipe.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, - "start_dind": obj.get("start_dind"), - "status": obj.get("status"), - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - "use_spot_instance": obj.get("use_spot_instance") if obj.get("use_spot_instance") is not None else False, - "routes": [DeploymentRouteRecipe.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, - "viewers": [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] if obj.get("viewers") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image": ( + ImageTagReference.from_dict(obj["image"]) + if obj.get("image") is not None + else None + ), + "instance_type": obj.get("instance_type"), + "environment_variables": obj.get("environment_variables"), + "working_directory": obj.get("working_directory"), + "extra_packages": ( + ExtraPackagesRecipe.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "token_scope": obj.get("token_scope"), + "dask_cluster": ( + DaskClusterAttachment.from_dict(obj["dask_cluster"]) + if obj.get("dask_cluster") is not None + else None + ), + "git_repositories": ( + [ + ExternalRepoAttachmentRecipe.from_dict(_item) + for _item in obj["git_repositories"] + ] + if obj.get("git_repositories") is not None + else None + ), + "secrets": ( + [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] + if obj.get("secrets") is not None + else None + ), + "shared_folders": ( + [ + SharedFolderAttachmentRecipe.from_dict(_item) + for _item in obj["shared_folders"] + ] + if obj.get("shared_folders") is not None + else None + ), + "start_dind": obj.get("start_dind"), + "status": obj.get("status"), + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + "use_spot_instance": ( + obj.get("use_spot_instance") + if obj.get("use_spot_instance") is not None + else False + ), + "routes": ( + [DeploymentRouteRecipe.from_dict(_item) for _item in obj["routes"]] + if obj.get("routes") is not None + else None + ), + "viewers": ( + [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] + if obj.get("viewers") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/deployment_start.py b/saturn_api/models/deployment_start.py index 2c0ef9d..9333ea4 100644 --- a/saturn_api/models/deployment_start.py +++ b/saturn_api/models/deployment_start.py @@ -1,32 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class DeploymentStart(BaseModel): """ DeploymentStart - """ # noqa: E501 - debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Deployment will continue to run on error, and SSH will be enabled.") + """ # noqa: E501 + + debug_mode: Optional[StrictBool] = Field( + default=None, + description="Enable debug mode. Deployment will continue to run on error, and SSH will be enabled.", + ) __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -35,7 +39,6 @@ class DeploymentStart(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "debug_mode": obj.get("debug_mode") - }) + _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) return _obj - - diff --git a/saturn_api/models/deployment_status.py b/saturn_api/models/deployment_status.py index 35ca0c3..f327d1c 100644 --- a/saturn_api/models/deployment_status.py +++ b/saturn_api/models/deployment_status.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,15 +27,13 @@ class DeploymentStatus(str, Enum): """ allowed enum values """ - PENDING = 'pending' - RUNNING = 'running' - STOPPING = 'stopping' - STOPPED = 'stopped' - ERROR = 'error' + PENDING = "pending" + RUNNING = "running" + STOPPING = "stopping" + STOPPED = "stopped" + ERROR = "error" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/deployment_update.py b/saturn_api/models/deployment_update.py index 2ef466f..7e88c9c 100644 --- a/saturn_api/models/deployment_update.py +++ b/saturn_api/models/deployment_update.py @@ -1,54 +1,111 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) from saturn_api.models.extra_packages import ExtraPackages -from typing import Literal, Optional, Set -from typing_extensions import Self + class DeploymentUpdate(BaseModel): """ DeploymentUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the deployment.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the deployment.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the deployment.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default=None, description="Description of the deployment." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the deployment." + ) image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") - environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments.") - extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") + image_enforce_trusted: Optional[StrictBool] = Field( + default=True, description="Enable image trust validation before attaching." + ) + environment_variables: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Mapping of environment variable keys to values." + ) + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( + default=None, description="List of external repo attachments." + ) + extra_packages: Optional[ExtraPackages] = Field( + default=None, description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, ConfigFileEntry]] = Field( + default=None, + description="User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode.", + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script that runs on start before the primary command." + ) working_dir: Optional[StrictStr] = Field(default=None, description="Initial working directory.") - instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the deployment.") - is_spot: Optional[StrictBool] = Field(default=None, description="Enables running on spot instance sizes.") + instance_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the deployment." + ) + is_spot: Optional[StrictBool] = Field( + default=None, description="Enables running on spot instance sizes." + ) start_dind: Optional[StrictBool] = Field(default=None, description="Enables docker-in-docker.") - command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Command that runs on start.") - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Number of pod replicas.") - subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain for the deployment URL.") - healthcheck: Optional[StrictStr] = Field(default=None, description="Healthcheck path on the deployment's primary port.") - start_ssh: Optional[StrictBool] = Field(default=None, description="Enable SSH access on the deployment.") - __properties: ClassVar[List[str]] = ["name", "description", "tags", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "instance_size", "is_spot", "start_dind", "command", "scale", "subdomain", "healthcheck", "start_ssh"] + command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( + default=None, description="Command that runs on start." + ) + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( + default=None, description="Number of pod replicas." + ) + subdomain: Optional[StrictStr] = Field( + default=None, description="Subdomain for the deployment URL." + ) + healthcheck: Optional[StrictStr] = Field( + default=None, description="Healthcheck path on the deployment's primary port." + ) + start_ssh: Optional[StrictBool] = Field( + default=None, description="Enable SSH access on the deployment." + ) + __properties: ClassVar[List[str]] = [ + "name", + "description", + "tags", + "image_uri", + "image_tag_id", + "image_enforce_trusted", + "environment_variables", + "external_repo_attachments", + "extra_packages", + "config_files", + "start_script", + "working_dir", + "instance_size", + "is_spot", + "start_dind", + "command", + "scale", + "subdomain", + "healthcheck", + "start_ssh", + ] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +113,6 @@ class DeploymentUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,8 +137,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -95,34 +150,46 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict['subdomain'] = None + _dict["subdomain"] = None # set to None if healthcheck (nullable) is None # and model_fields_set contains the field if self.healthcheck is None and "healthcheck" in self.model_fields_set: - _dict['healthcheck'] = None + _dict["healthcheck"] = None return _dict @@ -135,27 +202,50 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir"), - "instance_size": obj.get("instance_size"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "command": obj.get("command"), - "scale": obj.get("scale"), - "subdomain": obj.get("subdomain"), - "healthcheck": obj.get("healthcheck"), - "start_ssh": obj.get("start_ssh") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": ( + obj.get("image_enforce_trusted") + if obj.get("image_enforce_trusted") is not None + else True + ), + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": ( + [ + ExternalRepoAttachmentNested.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir"), + "instance_size": obj.get("instance_size"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "command": obj.get("command"), + "scale": obj.get("scale"), + "subdomain": obj.get("subdomain"), + "healthcheck": obj.get("healthcheck"), + "start_ssh": obj.get("start_ssh"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo.py b/saturn_api/models/external_repo.py index edd18c4..f86bb56 100644 --- a/saturn_api/models/external_repo.py +++ b/saturn_api/models/external_repo.py @@ -1,41 +1,55 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.owner import Owner from saturn_api.models.ssh_private_key_partial import SSHPrivateKeyPartial -from typing import Literal, Optional, Set -from typing_extensions import Self + class ExternalRepo(BaseModel): """ ExternalRepo - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the repository.") name: StrictStr = Field(description="Name of the repository.") owner: Owner = Field(description="Owner of the repository") created_at: StrictStr = Field(description="Creation timestamp.") remote_url: StrictStr = Field(description="Repository URL.") - ssh_privatekey_id: Optional[StrictStr] = Field(default=None, description="ID of an SSH Private Key with permission to pull the repository.") - ssh_privatekey: Optional[SSHPrivateKeyPartial] = Field(default=None, description="SSH Private Key information.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "created_at", "remote_url", "ssh_privatekey_id", "ssh_privatekey"] + ssh_privatekey_id: Optional[StrictStr] = Field( + default=None, description="ID of an SSH Private Key with permission to pull the repository." + ) + ssh_privatekey: Optional[SSHPrivateKeyPartial] = Field( + default=None, description="SSH Private Key information." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "created_at", + "remote_url", + "ssh_privatekey_id", + "ssh_privatekey", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +57,6 @@ class ExternalRepo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,15 +88,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "created_at", - "remote_url", - "ssh_privatekey_id", - "ssh_privatekey", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "created_at", + "remote_url", + "ssh_privatekey_id", + "ssh_privatekey", + ] + ) _dict = self.model_dump( by_alias=True, @@ -92,10 +107,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of ssh_privatekey if self.ssh_privatekey: - _dict['ssh_privatekey'] = self.ssh_privatekey.to_dict() + _dict["ssh_privatekey"] = self.ssh_privatekey.to_dict() return _dict @classmethod @@ -107,15 +122,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "created_at": obj.get("created_at"), - "remote_url": obj.get("remote_url"), - "ssh_privatekey_id": obj.get("ssh_privatekey_id"), - "ssh_privatekey": SSHPrivateKeyPartial.from_dict(obj["ssh_privatekey"]) if obj.get("ssh_privatekey") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "created_at": obj.get("created_at"), + "remote_url": obj.get("remote_url"), + "ssh_privatekey_id": obj.get("ssh_privatekey_id"), + "ssh_privatekey": ( + SSHPrivateKeyPartial.from_dict(obj["ssh_privatekey"]) + if obj.get("ssh_privatekey") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_attachment.py b/saturn_api/models/external_repo_attachment.py index 79f1794..2d0ea60 100644 --- a/saturn_api/models/external_repo_attachment.py +++ b/saturn_api/models/external_repo_attachment.py @@ -1,43 +1,66 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExternalRepoAttachment(BaseModel): """ ExternalRepoAttachment - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the external repository attachment.") - has_sshkey: StrictBool = Field(description="True if the repository has an attached SSH Private Key") + has_sshkey: StrictBool = Field( + description="True if the repository has an attached SSH Private Key" + ) path: StrictStr = Field(description="Path of the repository in the resource it is attached to.") created_at: StrictStr = Field(description="Creation timestamp.") external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") remote_url: StrictStr = Field(description="Repository URL") - deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID the repository is attached to.") - workspace_id: Optional[StrictStr] = Field(default=None, description="Workspace ID the repository is attached to.") - on_restart: StrictStr = Field(description="Repository clone behavior on restart. Preserve only applies when path is in a persistent volume.") - ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") + deployment_id: Optional[StrictStr] = Field( + default=None, description="Deployment ID the repository is attached to." + ) + workspace_id: Optional[StrictStr] = Field( + default=None, description="Workspace ID the repository is attached to." + ) + on_restart: StrictStr = Field( + description="Repository clone behavior on restart. Preserve only applies when path is in a persistent volume." + ) + ref: Optional[StrictStr] = Field( + default=None, description="Git version reference on the repository." + ) ref_type: Optional[StrictStr] = Field(default=None, description="Type of the git ref.") - __properties: ClassVar[List[str]] = ["id", "has_sshkey", "path", "created_at", "external_repo_id", "remote_url", "deployment_id", "workspace_id", "on_restart", "ref", "ref_type"] + __properties: ClassVar[List[str]] = [ + "id", + "has_sshkey", + "path", + "created_at", + "external_repo_id", + "remote_url", + "deployment_id", + "workspace_id", + "on_restart", + "ref", + "ref_type", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +68,6 @@ class ExternalRepoAttachment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,19 +103,21 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "has_sshkey", - "path", - "created_at", - "external_repo_id", - "remote_url", - "deployment_id", - "workspace_id", - "on_restart", - "ref", - "ref_type", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "has_sshkey", + "path", + "created_at", + "external_repo_id", + "remote_url", + "deployment_id", + "workspace_id", + "on_restart", + "ref", + "ref_type", + ] + ) _dict = self.model_dump( by_alias=True, @@ -103,22 +127,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if deployment_id (nullable) is None # and model_fields_set contains the field if self.deployment_id is None and "deployment_id" in self.model_fields_set: - _dict['deployment_id'] = None + _dict["deployment_id"] = None # set to None if workspace_id (nullable) is None # and model_fields_set contains the field if self.workspace_id is None and "workspace_id" in self.model_fields_set: - _dict['workspace_id'] = None + _dict["workspace_id"] = None # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict['ref'] = None + _dict["ref"] = None # set to None if ref_type (nullable) is None # and model_fields_set contains the field if self.ref_type is None and "ref_type" in self.model_fields_set: - _dict['ref_type'] = None + _dict["ref_type"] = None return _dict @@ -131,19 +155,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "has_sshkey": obj.get("has_sshkey"), - "path": obj.get("path"), - "created_at": obj.get("created_at"), - "external_repo_id": obj.get("external_repo_id"), - "remote_url": obj.get("remote_url"), - "deployment_id": obj.get("deployment_id"), - "workspace_id": obj.get("workspace_id"), - "on_restart": obj.get("on_restart"), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "has_sshkey": obj.get("has_sshkey"), + "path": obj.get("path"), + "created_at": obj.get("created_at"), + "external_repo_id": obj.get("external_repo_id"), + "remote_url": obj.get("remote_url"), + "deployment_id": obj.get("deployment_id"), + "workspace_id": obj.get("workspace_id"), + "on_restart": obj.get("on_restart"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_attachment_create.py b/saturn_api/models/external_repo_attachment_create.py index 4425865..3b7d22d 100644 --- a/saturn_api/models/external_repo_attachment_create.py +++ b/saturn_api/models/external_repo_attachment_create.py @@ -1,57 +1,70 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.resource_reference import ResourceReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.resource_reference import ResourceReference + + class ExternalRepoAttachmentCreate(BaseModel): """ ExternalRepoAttachmentCreate - """ # noqa: E501 + """ # noqa: E501 + external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") resource: ResourceReference = Field(description="Reference to a resource to attach to.") - path: Optional[StrictStr] = Field(default=None, description="Path of the repository in the resource it is attached to.") - on_restart: Literal['preserve changes', 'reclone'] = 'preserve changes' - ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") - ref_type: Literal['branch', 'commit', 'tag'] = 'branch' - __properties: ClassVar[List[str]] = ["external_repo_id", "resource", "path", "on_restart", "ref", "ref_type"] - - @field_validator('on_restart') + path: Optional[StrictStr] = Field( + default=None, description="Path of the repository in the resource it is attached to." + ) + on_restart: Literal["preserve changes", "reclone"] = "preserve changes" + ref: Optional[StrictStr] = Field( + default=None, description="Git version reference on the repository." + ) + ref_type: Literal["branch", "commit", "tag"] = "branch" + __properties: ClassVar[List[str]] = [ + "external_repo_id", + "resource", + "path", + "on_restart", + "ref", + "ref_type", + ] + + @field_validator("on_restart") def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['preserve changes', 'reclone']): + if value not in set(["preserve changes", "reclone"]): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator('ref_type') + @field_validator("ref_type") def ref_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['branch', 'commit', 'tag']): + if value not in set(["branch", "commit", "tag"]): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -61,7 +74,6 @@ def ref_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,8 +98,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -96,11 +107,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of resource if self.resource: - _dict['resource'] = self.resource.to_dict() + _dict["resource"] = self.resource.to_dict() # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict['ref'] = None + _dict["ref"] = None return _dict @@ -113,14 +124,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "external_repo_id": obj.get("external_repo_id"), - "resource": ResourceReference.from_dict(obj["resource"]) if obj.get("resource") is not None else None, - "path": obj.get("path"), - "on_restart": obj.get("on_restart") if obj.get("on_restart") is not None else 'preserve changes', - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type") if obj.get("ref_type") is not None else 'branch' - }) + _obj = cls.model_validate( + { + "external_repo_id": obj.get("external_repo_id"), + "resource": ( + ResourceReference.from_dict(obj["resource"]) + if obj.get("resource") is not None + else None + ), + "path": obj.get("path"), + "on_restart": ( + obj.get("on_restart") + if obj.get("on_restart") is not None + else "preserve changes" + ), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type") if obj.get("ref_type") is not None else "branch", + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_attachment_list.py b/saturn_api/models/external_repo_attachment_list.py index d78e8c0..9cc2e34 100644 --- a/saturn_api/models/external_repo_attachment_list.py +++ b/saturn_api/models/external_repo_attachment_list.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.external_repo_attachment import ExternalRepoAttachment -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.external_repo_attachment import ExternalRepoAttachment + + class ExternalRepoAttachmentList(BaseModel): """ ExternalRepoAttachmentList - """ # noqa: E501 - external_repo_attachments: List[ExternalRepoAttachment] = Field(description="List of external repository attachments.") + """ # noqa: E501 + + external_repo_attachments: List[ExternalRepoAttachment] = Field( + description="List of external repository attachments." + ) prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["external_repo_attachments", "prev_key", "next_key"] @@ -38,7 +42,6 @@ class ExternalRepoAttachmentList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +69,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "external_repo_attachments", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "external_repo_attachments", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items return _dict @classmethod @@ -95,11 +100,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "external_repo_attachments": [ExternalRepoAttachment.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "external_repo_attachments": ( + [ + ExternalRepoAttachment.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_attachment_nested.py b/saturn_api/models/external_repo_attachment_nested.py index 9e06fd7..3fff001 100644 --- a/saturn_api/models/external_repo_attachment_nested.py +++ b/saturn_api/models/external_repo_attachment_nested.py @@ -1,55 +1,66 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExternalRepoAttachmentNested(BaseModel): """ ExternalRepoAttachmentNested - """ # noqa: E501 - path: Optional[StrictStr] = Field(default=None, description="Path of the repository in the resource it is attached to.") - on_restart: Literal['preserve changes', 'reclone'] | None = None - ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") - ref_type: Literal['branch', 'commit', 'tag'] | None = None - external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") - __properties: ClassVar[List[str]] = ["path", "on_restart", "ref", "ref_type", "external_repo_id"] + """ # noqa: E501 - @field_validator('on_restart') + path: Optional[StrictStr] = Field( + default=None, description="Path of the repository in the resource it is attached to." + ) + on_restart: Literal["preserve changes", "reclone"] | None = None + ref: Optional[StrictStr] = Field( + default=None, description="Git version reference on the repository." + ) + ref_type: Literal["branch", "commit", "tag"] | None = None + external_repo_id: StrictStr = Field(description="ID of the external repository to attach.") + __properties: ClassVar[List[str]] = [ + "path", + "on_restart", + "ref", + "ref_type", + "external_repo_id", + ] + + @field_validator("on_restart") def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['preserve changes', 'reclone']): + if value not in set(["preserve changes", "reclone"]): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator('ref_type') + @field_validator("ref_type") def ref_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['branch', 'commit', 'tag']): + if value not in set(["branch", "commit", "tag"]): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -59,7 +70,6 @@ def ref_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,8 +94,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -95,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict['ref'] = None + _dict["ref"] = None return _dict @@ -108,13 +117,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "path": obj.get("path"), - "on_restart": obj.get("on_restart"), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type"), - "external_repo_id": obj.get("external_repo_id") - }) + _obj = cls.model_validate( + { + "path": obj.get("path"), + "on_restart": obj.get("on_restart"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type"), + "external_repo_id": obj.get("external_repo_id"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_attachment_recipe.py b/saturn_api/models/external_repo_attachment_recipe.py index 67dcd63..8146a7d 100644 --- a/saturn_api/models/external_repo_attachment_recipe.py +++ b/saturn_api/models/external_repo_attachment_recipe.py @@ -1,56 +1,64 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExternalRepoAttachmentRecipe(BaseModel): """ ExternalRepoAttachmentRecipe - """ # noqa: E501 + """ # noqa: E501 + url: StrictStr path: Optional[StrictStr] = None - on_restart: Literal['preserve changes', 'reclone'] | None = None + on_restart: Literal["preserve changes", "reclone"] | None = None reference: Optional[StrictStr] = None - reference_type: Literal['branch', 'commit', 'tag'] = 'branch' + reference_type: Literal["branch", "commit", "tag"] = "branch" public: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["url", "path", "on_restart", "reference", "reference_type", "public"] - - @field_validator('on_restart') + __properties: ClassVar[List[str]] = [ + "url", + "path", + "on_restart", + "reference", + "reference_type", + "public", + ] + + @field_validator("on_restart") def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['preserve changes', 'reclone']): + if value not in set(["preserve changes", "reclone"]): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator('reference_type') + @field_validator("reference_type") def reference_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['branch', 'commit', 'tag']): + if value not in set(["branch", "commit", "tag"]): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -60,7 +68,6 @@ def reference_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -96,7 +102,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if reference (nullable) is None # and model_fields_set contains the field if self.reference is None and "reference" in self.model_fields_set: - _dict['reference'] = None + _dict["reference"] = None return _dict @@ -109,14 +115,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "url": obj.get("url"), - "path": obj.get("path"), - "on_restart": obj.get("on_restart"), - "reference": obj.get("reference"), - "reference_type": obj.get("reference_type") if obj.get("reference_type") is not None else 'branch', - "public": obj.get("public") if obj.get("public") is not None else False - }) + _obj = cls.model_validate( + { + "url": obj.get("url"), + "path": obj.get("path"), + "on_restart": obj.get("on_restart"), + "reference": obj.get("reference"), + "reference_type": ( + obj.get("reference_type") if obj.get("reference_type") is not None else "branch" + ), + "public": obj.get("public") if obj.get("public") is not None else False, + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_attachment_update.py b/saturn_api/models/external_repo_attachment_update.py index 3a440a4..3843666 100644 --- a/saturn_api/models/external_repo_attachment_update.py +++ b/saturn_api/models/external_repo_attachment_update.py @@ -1,54 +1,59 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExternalRepoAttachmentUpdate(BaseModel): """ ExternalRepoAttachmentUpdate - """ # noqa: E501 - path: Optional[StrictStr] = Field(default=None, description="Path of the repository in the resource it is attached to.") - on_restart: Literal['preserve changes', 'reclone'] | None = None - ref: Optional[StrictStr] = Field(default=None, description="Git version reference on the repository.") - ref_type: Literal['branch', 'commit', 'tag'] | None = None + """ # noqa: E501 + + path: Optional[StrictStr] = Field( + default=None, description="Path of the repository in the resource it is attached to." + ) + on_restart: Literal["preserve changes", "reclone"] | None = None + ref: Optional[StrictStr] = Field( + default=None, description="Git version reference on the repository." + ) + ref_type: Literal["branch", "commit", "tag"] | None = None __properties: ClassVar[List[str]] = ["path", "on_restart", "ref", "ref_type"] - @field_validator('on_restart') + @field_validator("on_restart") def on_restart_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['preserve changes', 'reclone']): + if value not in set(["preserve changes", "reclone"]): raise ValueError("must be one of enum values ('preserve changes', 'reclone')") return value - @field_validator('ref_type') + @field_validator("ref_type") def ref_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['branch', 'commit', 'tag']): + if value not in set(["branch", "commit", "tag"]): raise ValueError("must be one of enum values ('branch', 'commit', 'tag')") return value @@ -58,7 +63,6 @@ def ref_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,8 +87,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -94,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if ref (nullable) is None # and model_fields_set contains the field if self.ref is None and "ref" in self.model_fields_set: - _dict['ref'] = None + _dict["ref"] = None return _dict @@ -107,12 +110,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "path": obj.get("path"), - "on_restart": obj.get("on_restart"), - "ref": obj.get("ref"), - "ref_type": obj.get("ref_type") - }) + _obj = cls.model_validate( + { + "path": obj.get("path"), + "on_restart": obj.get("on_restart"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_create.py b/saturn_api/models/external_repo_create.py index b76d2f2..398162b 100644 --- a/saturn_api/models/external_repo_create.py +++ b/saturn_api/models/external_repo_create.py @@ -1,35 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_reference import OwnerReference + + class ExternalRepoCreate(BaseModel): """ ExternalRepoCreate - """ # noqa: E501 + """ # noqa: E501 + remote_url: StrictStr = Field(description="Repo URL.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the repository.") - ssh_privatekey_id: Optional[StrictStr] = Field(default=None, description="ID of an SSH Private Key with permission to pull the repository.") + ssh_privatekey_id: Optional[StrictStr] = Field( + default=None, description="ID of an SSH Private Key with permission to pull the repository." + ) __properties: ClassVar[List[str]] = ["remote_url", "owner", "ssh_privatekey_id"] model_config = ConfigDict( @@ -38,7 +42,6 @@ class ExternalRepoCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # set to None if ssh_privatekey_id (nullable) is None # and model_fields_set contains the field if self.ssh_privatekey_id is None and "ssh_privatekey_id" in self.model_fields_set: - _dict['ssh_privatekey_id'] = None + _dict["ssh_privatekey_id"] = None return _dict @@ -90,11 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "remote_url": obj.get("remote_url"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "ssh_privatekey_id": obj.get("ssh_privatekey_id") - }) + _obj = cls.model_validate( + { + "remote_url": obj.get("remote_url"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "ssh_privatekey_id": obj.get("ssh_privatekey_id"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_list.py b/saturn_api/models/external_repo_list.py index bedaa1e..59c3f27 100644 --- a/saturn_api/models/external_repo_list.py +++ b/saturn_api/models/external_repo_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.external_repo import ExternalRepo -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.external_repo import ExternalRepo + + class ExternalRepoList(BaseModel): """ ExternalRepoList - """ # noqa: E501 + """ # noqa: E501 + external_repos: List[ExternalRepo] = Field(description="List of external repositories.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ExternalRepoList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "external_repos", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "external_repos", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repos in self.external_repos: if _item_external_repos: _items.append(_item_external_repos.to_dict()) - _dict['external_repos'] = _items + _dict["external_repos"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "external_repos": [ExternalRepo.from_dict(_item) for _item in obj["external_repos"]] if obj.get("external_repos") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "external_repos": ( + [ExternalRepo.from_dict(_item) for _item in obj["external_repos"]] + if obj.get("external_repos") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/external_repo_update.py b/saturn_api/models/external_repo_update.py index 2e7153f..1be85f6 100644 --- a/saturn_api/models/external_repo_update.py +++ b/saturn_api/models/external_repo_update.py @@ -1,33 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExternalRepoUpdate(BaseModel): """ ExternalRepoUpdate - """ # noqa: E501 + """ # noqa: E501 + remote_url: Optional[StrictStr] = Field(default=None, description="Repository URL.") - ssh_privatekey_id: Optional[StrictStr] = Field(default=None, description="ID of an SSH Private Key with permission to pull the repository.") + ssh_privatekey_id: Optional[StrictStr] = Field( + default=None, description="ID of an SSH Private Key with permission to pull the repository." + ) __properties: ClassVar[List[str]] = ["remote_url", "ssh_privatekey_id"] model_config = ConfigDict( @@ -36,7 +39,6 @@ class ExternalRepoUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if ssh_privatekey_id (nullable) is None # and model_fields_set contains the field if self.ssh_privatekey_id is None and "ssh_privatekey_id" in self.model_fields_set: - _dict['ssh_privatekey_id'] = None + _dict["ssh_privatekey_id"] = None return _dict @@ -85,10 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "remote_url": obj.get("remote_url"), - "ssh_privatekey_id": obj.get("ssh_privatekey_id") - }) + _obj = cls.model_validate( + {"remote_url": obj.get("remote_url"), "ssh_privatekey_id": obj.get("ssh_privatekey_id")} + ) return _obj - - diff --git a/saturn_api/models/extra_packages.py b/saturn_api/models/extra_packages.py index ccda484..7b2783a 100644 --- a/saturn_api/models/extra_packages.py +++ b/saturn_api/models/extra_packages.py @@ -1,41 +1,60 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExtraPackages(BaseModel): """ ExtraPackages - """ # noqa: E501 + """ # noqa: E501 + pip: Optional[StrictStr] = Field(default=None, description="Pip packages to install.") - as_requirements_txt: Optional[StrictBool] = Field(default=False, description="True if pip field is formatted as requirements.txt") + as_requirements_txt: Optional[StrictBool] = Field( + default=False, description="True if pip field is formatted as requirements.txt" + ) conda: Optional[StrictStr] = Field(default=None, description="Conda packages to install") - as_environment_yml: Optional[StrictBool] = Field(default=False, description="True if conda field is formatted as environment.yaml") + as_environment_yml: Optional[StrictBool] = Field( + default=False, description="True if conda field is formatted as environment.yaml" + ) apt: Optional[StrictStr] = Field(default=None, description="Apt packages to install.") cran: Optional[StrictStr] = Field(default=None, description="Cran packages to install.") remotes: Optional[StrictStr] = Field(default=None, description="Remotes packages to install.") - bioconductor: Optional[StrictStr] = Field(default=None, description="Bioconductor packages to install.") - use_mamba: Optional[StrictBool] = Field(default=False, description="Enable installing conda packages with mamba.") - __properties: ClassVar[List[str]] = ["pip", "as_requirements_txt", "conda", "as_environment_yml", "apt", "cran", "remotes", "bioconductor", "use_mamba"] + bioconductor: Optional[StrictStr] = Field( + default=None, description="Bioconductor packages to install." + ) + use_mamba: Optional[StrictBool] = Field( + default=False, description="Enable installing conda packages with mamba." + ) + __properties: ClassVar[List[str]] = [ + "pip", + "as_requirements_txt", + "conda", + "as_environment_yml", + "apt", + "cran", + "remotes", + "bioconductor", + "use_mamba", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +62,6 @@ class ExtraPackages(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,32 +96,32 @@ def to_dict(self) -> Dict[str, Any]: # set to None if pip (nullable) is None # and model_fields_set contains the field if self.pip is None and "pip" in self.model_fields_set: - _dict['pip'] = None + _dict["pip"] = None # set to None if conda (nullable) is None # and model_fields_set contains the field if self.conda is None and "conda" in self.model_fields_set: - _dict['conda'] = None + _dict["conda"] = None # set to None if apt (nullable) is None # and model_fields_set contains the field if self.apt is None and "apt" in self.model_fields_set: - _dict['apt'] = None + _dict["apt"] = None # set to None if cran (nullable) is None # and model_fields_set contains the field if self.cran is None and "cran" in self.model_fields_set: - _dict['cran'] = None + _dict["cran"] = None # set to None if remotes (nullable) is None # and model_fields_set contains the field if self.remotes is None and "remotes" in self.model_fields_set: - _dict['remotes'] = None + _dict["remotes"] = None # set to None if bioconductor (nullable) is None # and model_fields_set contains the field if self.bioconductor is None and "bioconductor" in self.model_fields_set: - _dict['bioconductor'] = None + _dict["bioconductor"] = None return _dict @@ -117,17 +134,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pip": obj.get("pip"), - "as_requirements_txt": obj.get("as_requirements_txt") if obj.get("as_requirements_txt") is not None else False, - "conda": obj.get("conda"), - "as_environment_yml": obj.get("as_environment_yml") if obj.get("as_environment_yml") is not None else False, - "apt": obj.get("apt"), - "cran": obj.get("cran"), - "remotes": obj.get("remotes"), - "bioconductor": obj.get("bioconductor"), - "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False - }) + _obj = cls.model_validate( + { + "pip": obj.get("pip"), + "as_requirements_txt": ( + obj.get("as_requirements_txt") + if obj.get("as_requirements_txt") is not None + else False + ), + "conda": obj.get("conda"), + "as_environment_yml": ( + obj.get("as_environment_yml") + if obj.get("as_environment_yml") is not None + else False + ), + "apt": obj.get("apt"), + "cran": obj.get("cran"), + "remotes": obj.get("remotes"), + "bioconductor": obj.get("bioconductor"), + "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, + } + ) return _obj - - diff --git a/saturn_api/models/extra_packages_recipe.py b/saturn_api/models/extra_packages_recipe.py index dd14b8c..6387029 100644 --- a/saturn_api/models/extra_packages_recipe.py +++ b/saturn_api/models/extra_packages_recipe.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.extra_packages_recipe_apt import ExtraPackagesRecipeApt from saturn_api.models.extra_packages_recipe_conda import ExtraPackagesRecipeConda from saturn_api.models.extra_packages_recipe_pip import ExtraPackagesRecipePip -from typing import Literal, Optional, Set -from typing_extensions import Self + class ExtraPackagesRecipe(BaseModel): """ ExtraPackagesRecipe - """ # noqa: E501 + """ # noqa: E501 + pip: Optional[ExtraPackagesRecipePip] = None conda: Optional[ExtraPackagesRecipeConda] = None apt: Optional[ExtraPackagesRecipeApt] = None @@ -43,7 +45,6 @@ class ExtraPackagesRecipe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,8 +69,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,22 +78,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of pip if self.pip: - _dict['pip'] = self.pip.to_dict() + _dict["pip"] = self.pip.to_dict() # override the default output from pydantic by calling `to_dict()` of conda if self.conda: - _dict['conda'] = self.conda.to_dict() + _dict["conda"] = self.conda.to_dict() # override the default output from pydantic by calling `to_dict()` of apt if self.apt: - _dict['apt'] = self.apt.to_dict() + _dict["apt"] = self.apt.to_dict() # override the default output from pydantic by calling `to_dict()` of cran if self.cran: - _dict['cran'] = self.cran.to_dict() + _dict["cran"] = self.cran.to_dict() # override the default output from pydantic by calling `to_dict()` of remotes if self.remotes: - _dict['remotes'] = self.remotes.to_dict() + _dict["remotes"] = self.remotes.to_dict() # override the default output from pydantic by calling `to_dict()` of bioconductor if self.bioconductor: - _dict['bioconductor'] = self.bioconductor.to_dict() + _dict["bioconductor"] = self.bioconductor.to_dict() return _dict @classmethod @@ -105,14 +105,38 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pip": ExtraPackagesRecipePip.from_dict(obj["pip"]) if obj.get("pip") is not None else None, - "conda": ExtraPackagesRecipeConda.from_dict(obj["conda"]) if obj.get("conda") is not None else None, - "apt": ExtraPackagesRecipeApt.from_dict(obj["apt"]) if obj.get("apt") is not None else None, - "cran": ExtraPackagesRecipeApt.from_dict(obj["cran"]) if obj.get("cran") is not None else None, - "remotes": ExtraPackagesRecipeApt.from_dict(obj["remotes"]) if obj.get("remotes") is not None else None, - "bioconductor": ExtraPackagesRecipeApt.from_dict(obj["bioconductor"]) if obj.get("bioconductor") is not None else None - }) + _obj = cls.model_validate( + { + "pip": ( + ExtraPackagesRecipePip.from_dict(obj["pip"]) + if obj.get("pip") is not None + else None + ), + "conda": ( + ExtraPackagesRecipeConda.from_dict(obj["conda"]) + if obj.get("conda") is not None + else None + ), + "apt": ( + ExtraPackagesRecipeApt.from_dict(obj["apt"]) + if obj.get("apt") is not None + else None + ), + "cran": ( + ExtraPackagesRecipeApt.from_dict(obj["cran"]) + if obj.get("cran") is not None + else None + ), + "remotes": ( + ExtraPackagesRecipeApt.from_dict(obj["remotes"]) + if obj.get("remotes") is not None + else None + ), + "bioconductor": ( + ExtraPackagesRecipeApt.from_dict(obj["bioconductor"]) + if obj.get("bioconductor") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/extra_packages_recipe_apt.py b/saturn_api/models/extra_packages_recipe_apt.py index 06ae572..f824ece 100644 --- a/saturn_api/models/extra_packages_recipe_apt.py +++ b/saturn_api/models/extra_packages_recipe_apt.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExtraPackagesRecipeApt(BaseModel): """ ExtraPackagesRecipeApt - """ # noqa: E501 + """ # noqa: E501 + install: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["install"] @@ -35,7 +36,6 @@ class ExtraPackagesRecipeApt(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "install": obj.get("install") - }) + _obj = cls.model_validate({"install": obj.get("install")}) return _obj - - diff --git a/saturn_api/models/extra_packages_recipe_conda.py b/saturn_api/models/extra_packages_recipe_conda.py index 6fda134..8c575eb 100644 --- a/saturn_api/models/extra_packages_recipe_conda.py +++ b/saturn_api/models/extra_packages_recipe_conda.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExtraPackagesRecipeConda(BaseModel): """ ExtraPackagesRecipeConda - """ # noqa: E501 + """ # noqa: E501 + install: Optional[StrictStr] = None environment_yml: Optional[StrictStr] = None use_mamba: Optional[StrictBool] = False @@ -37,7 +38,6 @@ class ExtraPackagesRecipeConda(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,11 +80,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "install": obj.get("install"), - "environment_yml": obj.get("environment_yml"), - "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False - }) + _obj = cls.model_validate( + { + "install": obj.get("install"), + "environment_yml": obj.get("environment_yml"), + "use_mamba": obj.get("use_mamba") if obj.get("use_mamba") is not None else False, + } + ) return _obj - - diff --git a/saturn_api/models/extra_packages_recipe_pip.py b/saturn_api/models/extra_packages_recipe_pip.py index c8f5825..ee24a4f 100644 --- a/saturn_api/models/extra_packages_recipe_pip.py +++ b/saturn_api/models/extra_packages_recipe_pip.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ExtraPackagesRecipePip(BaseModel): """ ExtraPackagesRecipePip - """ # noqa: E501 + """ # noqa: E501 + install: Optional[StrictStr] = None requirements_txt: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["install", "requirements_txt"] @@ -36,7 +37,6 @@ class ExtraPackagesRecipePip(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "install": obj.get("install"), - "requirements_txt": obj.get("requirements_txt") - }) + _obj = cls.model_validate( + {"install": obj.get("install"), "requirements_txt": obj.get("requirements_txt")} + ) return _obj - - diff --git a/saturn_api/models/fine_tune_job_create.py b/saturn_api/models/fine_tune_job_create.py new file mode 100644 index 0000000..bd13d05 --- /dev/null +++ b/saturn_api/models/fine_tune_job_create.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + +from saturn_api.models.hyperparameters1 import Hyperparameters1 + + +class FineTuneJobCreate(BaseModel): + """ + FineTuneJobCreate + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Human-readable name for the fine-tuning job." + ) + base_model: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Base model to fine-tune. Must be one of the platform's supported models (see SUPPORTED_MODELS allow-list)." + ) + dataset_id: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Identifier of a token-factory dataset artifact. The dataset must have status=READY and belong to the same org as the requester." + ) + hyperparameters: Hyperparameters1 = Field(description="Training hyperparameters.") + instance_size: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Saturn instance size to run the training pod on. Must be a GPU-equipped size (gpu > 0)." + ) + __properties: ClassVar[List[str]] = [ + "name", + "base_model", + "dataset_id", + "hyperparameters", + "instance_size", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FineTuneJobCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hyperparameters + if self.hyperparameters: + _dict["hyperparameters"] = self.hyperparameters.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FineTuneJobCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "base_model": obj.get("base_model"), + "dataset_id": obj.get("dataset_id"), + "hyperparameters": ( + Hyperparameters1.from_dict(obj["hyperparameters"]) + if obj.get("hyperparameters") is not None + else None + ), + "instance_size": obj.get("instance_size"), + } + ) + return _obj diff --git a/saturn_api/models/fine_tune_job_list.py b/saturn_api/models/fine_tune_job_list.py new file mode 100644 index 0000000..f09072f --- /dev/null +++ b/saturn_api/models/fine_tune_job_list.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.fine_tune_job_view import FineTuneJobView + + +class FineTuneJobList(BaseModel): + """ + FineTuneJobList + """ # noqa: E501 + + jobs: List[FineTuneJobView] = Field( + description="List of fine-tuning jobs (FineTuneJobView projections)." + ) + prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") + next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") + __properties: ClassVar[List[str]] = ["jobs", "prev_key", "next_key"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FineTuneJobList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "jobs", + "prev_key", + "next_key", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in jobs (list) + _items = [] + if self.jobs: + for _item_jobs in self.jobs: + if _item_jobs: + _items.append(_item_jobs.to_dict()) + _dict["jobs"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FineTuneJobList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "jobs": ( + [FineTuneJobView.from_dict(_item) for _item in obj["jobs"]] + if obj.get("jobs") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) + return _obj diff --git a/saturn_api/models/fine_tune_job_view.py b/saturn_api/models/fine_tune_job_view.py new file mode 100644 index 0000000..17ec5d3 --- /dev/null +++ b/saturn_api/models/fine_tune_job_view.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.hyperparameters import Hyperparameters + + +class FineTuneJobView(BaseModel): + """ + FineTuneJobView + """ # noqa: E501 + + id: StrictStr = Field(description="Fine-tune job ID (same as the underlying deployment ID).") + name: StrictStr + status: StrictStr = Field( + description="Underlying Saturn job status: pending, running, stopping, stopped, completed, or error. Same vocabulary as the rest of the platform — TF intentionally does not translate to a product-specific set." + ) + created_at: StrictStr + started_at: Optional[StrictStr] + finished_at: Optional[StrictStr] + base_model: StrictStr + hyperparameters: Hyperparameters + dataset_id: StrictStr + output_location: StrictStr = Field( + description="Structured location of the job's RW output folder: sf:/jobs//." + ) + checkpoint: Optional[Any] = Field( + description="Resolved checkpoint artifact (kind=checkpoint). Populated by the future checkpoint-registration PR; null until then." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "status", + "created_at", + "started_at", + "finished_at", + "base_model", + "hyperparameters", + "dataset_id", + "output_location", + "checkpoint", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FineTuneJobView from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "id", + "name", + "status", + "created_at", + "started_at", + "finished_at", + "base_model", + "hyperparameters", + "dataset_id", + "output_location", + "checkpoint", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hyperparameters + if self.hyperparameters: + _dict["hyperparameters"] = self.hyperparameters.to_dict() + # set to None if started_at (nullable) is None + # and model_fields_set contains the field + if self.started_at is None and "started_at" in self.model_fields_set: + _dict["started_at"] = None + + # set to None if finished_at (nullable) is None + # and model_fields_set contains the field + if self.finished_at is None and "finished_at" in self.model_fields_set: + _dict["finished_at"] = None + + # set to None if checkpoint (nullable) is None + # and model_fields_set contains the field + if self.checkpoint is None and "checkpoint" in self.model_fields_set: + _dict["checkpoint"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FineTuneJobView from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "base_model": obj.get("base_model"), + "hyperparameters": ( + Hyperparameters.from_dict(obj["hyperparameters"]) + if obj.get("hyperparameters") is not None + else None + ), + "dataset_id": obj.get("dataset_id"), + "output_location": obj.get("output_location"), + "checkpoint": obj.get("checkpoint"), + } + ) + return _obj diff --git a/saturn_api/models/group.py b/saturn_api/models/group.py index de4344d..f0588e1 100644 --- a/saturn_api/models/group.py +++ b/saturn_api/models/group.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class Group(BaseModel): """ Group - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the group.") groupname: StrictStr = Field(description="Name of the group.") created_at: StrictStr = Field(description="Creation timestamp.") @@ -35,7 +36,17 @@ class Group(BaseModel): org_id: StrictStr = Field(description="Org ID that the group belongs to.") org_name: StrictStr = Field(description="Org name that the group belongs to.") org_admin: StrictBool = Field(description="Enable group to take privileged actions on its org.") - __properties: ClassVar[List[str]] = ["id", "groupname", "created_at", "description", "avatar_url", "is_multiple_ssh_keys", "org_id", "org_name", "org_admin"] + __properties: ClassVar[List[str]] = [ + "id", + "groupname", + "created_at", + "description", + "avatar_url", + "is_multiple_ssh_keys", + "org_id", + "org_name", + "org_admin", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +54,6 @@ class Group(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,17 +87,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "groupname", - "created_at", - "description", - "avatar_url", - "is_multiple_ssh_keys", - "org_id", - "org_name", - "org_admin", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "groupname", + "created_at", + "description", + "avatar_url", + "is_multiple_ssh_keys", + "org_id", + "org_name", + "org_admin", + ] + ) _dict = self.model_dump( by_alias=True, @@ -105,17 +117,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "groupname": obj.get("groupname"), - "created_at": obj.get("created_at"), - "description": obj.get("description"), - "avatar_url": obj.get("avatar_url"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "org_id": obj.get("org_id"), - "org_name": obj.get("org_name"), - "org_admin": obj.get("org_admin") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "groupname": obj.get("groupname"), + "created_at": obj.get("created_at"), + "description": obj.get("description"), + "avatar_url": obj.get("avatar_url"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "org_admin": obj.get("org_admin"), + } + ) return _obj - - diff --git a/saturn_api/models/group_create.py b/saturn_api/models/group_create.py index d310961..b063e4f 100644 --- a/saturn_api/models/group_create.py +++ b/saturn_api/models/group_create.py @@ -1,37 +1,51 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class GroupCreate(BaseModel): """ GroupCreate - """ # noqa: E501 + """ # noqa: E501 + groupname: StrictStr = Field(description="Name of the group.") - org_id: Optional[StrictStr] = Field(default=None, description="Org ID that the group belongs to. Defaults to the default org for the authenticated user.") + org_id: Optional[StrictStr] = Field( + default=None, + description="Org ID that the group belongs to. Defaults to the default org for the authenticated user.", + ) description: Optional[StrictStr] = Field(default=None, description="Description of the group.") - is_multiple_ssh_keys: Optional[StrictBool] = Field(default=False, description="Enable multiple SSH keys.") - org_admin: Optional[StrictBool] = Field(default=False, description="Enable group to take privileged actions on its org.") - __properties: ClassVar[List[str]] = ["groupname", "org_id", "description", "is_multiple_ssh_keys", "org_admin"] + is_multiple_ssh_keys: Optional[StrictBool] = Field( + default=False, description="Enable multiple SSH keys." + ) + org_admin: Optional[StrictBool] = Field( + default=False, description="Enable group to take privileged actions on its org." + ) + __properties: ClassVar[List[str]] = [ + "groupname", + "org_id", + "description", + "is_multiple_ssh_keys", + "org_admin", + ] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +53,6 @@ class GroupCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if org_id (nullable) is None # and model_fields_set contains the field if self.org_id is None and "org_id" in self.model_fields_set: - _dict['org_id'] = None + _dict["org_id"] = None return _dict @@ -88,13 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "groupname": obj.get("groupname"), - "org_id": obj.get("org_id"), - "description": obj.get("description"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys") if obj.get("is_multiple_ssh_keys") is not None else False, - "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False - }) + _obj = cls.model_validate( + { + "groupname": obj.get("groupname"), + "org_id": obj.get("org_id"), + "description": obj.get("description"), + "is_multiple_ssh_keys": ( + obj.get("is_multiple_ssh_keys") + if obj.get("is_multiple_ssh_keys") is not None + else False + ), + "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False, + } + ) return _obj - - diff --git a/saturn_api/models/group_list.py b/saturn_api/models/group_list.py index b8a24d4..c8060d4 100644 --- a/saturn_api/models/group_list.py +++ b/saturn_api/models/group_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.group import Group -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.group import Group + + class GroupList(BaseModel): """ GroupList - """ # noqa: E501 + """ # noqa: E501 + groups: List[Group] = Field(description="List of groups.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class GroupList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "groups", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "groups", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_groups in self.groups: if _item_groups: _items.append(_item_groups.to_dict()) - _dict['groups'] = _items + _dict["groups"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "groups": [Group.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "groups": ( + [Group.from_dict(_item) for _item in obj["groups"]] + if obj.get("groups") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/group_member.py b/saturn_api/models/group_member.py index d336f08..c67a66c 100644 --- a/saturn_api/models/group_member.py +++ b/saturn_api/models/group_member.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class GroupMember(BaseModel): """ GroupMember - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the group member") created_at: StrictStr = Field(description="Creation timestamp.") user_id: StrictStr = Field(description="User ID of the group member.") @@ -38,7 +39,6 @@ class GroupMember(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "user_id", - "group_id", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "user_id", + "group_id", + ] + ) _dict = self.model_dump( by_alias=True, @@ -90,12 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + } + ) return _obj - - diff --git a/saturn_api/models/group_member_create.py b/saturn_api/models/group_member_create.py index 40daa89..aee4699 100644 --- a/saturn_api/models/group_member_create.py +++ b/saturn_api/models/group_member_create.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class GroupMemberCreate(BaseModel): """ GroupMemberCreate - """ # noqa: E501 + """ # noqa: E501 + user_id: StrictStr = Field(description="User ID to add to the group.") __properties: ClassVar[List[str]] = ["user_id"] @@ -35,7 +36,6 @@ class GroupMemberCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "user_id": obj.get("user_id") - }) + _obj = cls.model_validate({"user_id": obj.get("user_id")}) return _obj - - diff --git a/saturn_api/models/group_member_list.py b/saturn_api/models/group_member_list.py index 97a3fb9..f945a1f 100644 --- a/saturn_api/models/group_member_list.py +++ b/saturn_api/models/group_member_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.user import User -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.user import User + + class GroupMemberList(BaseModel): """ GroupMemberList - """ # noqa: E501 + """ # noqa: E501 + users: List[User] = Field(description="List of users.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class GroupMemberList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "users", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "users", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_users in self.users: if _item_users: _items.append(_item_users.to_dict()) - _dict['users'] = _items + _dict["users"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "users": ( + [User.from_dict(_item) for _item in obj["users"]] + if obj.get("users") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/group_update.py b/saturn_api/models/group_update.py index 1e1d4d9..a07ee62 100644 --- a/saturn_api/models/group_update.py +++ b/saturn_api/models/group_update.py @@ -1,36 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class GroupUpdate(BaseModel): """ GroupUpdate - """ # noqa: E501 + """ # noqa: E501 + groupname: Optional[StrictStr] = Field(default=None, description="Name of the group.") description: Optional[StrictStr] = Field(default=None, description="Description of the group.") - is_multiple_ssh_keys: Optional[StrictBool] = Field(default=None, description="Enable multiple SSH keys.") - org_admin: Optional[StrictBool] = Field(default=None, description="Enable group to take privileged actions on its org.") - __properties: ClassVar[List[str]] = ["groupname", "description", "is_multiple_ssh_keys", "org_admin"] + is_multiple_ssh_keys: Optional[StrictBool] = Field( + default=None, description="Enable multiple SSH keys." + ) + org_admin: Optional[StrictBool] = Field( + default=None, description="Enable group to take privileged actions on its org." + ) + __properties: ClassVar[List[str]] = [ + "groupname", + "description", + "is_multiple_ssh_keys", + "org_admin", + ] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +48,6 @@ class GroupUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +72,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,12 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "groupname": obj.get("groupname"), - "description": obj.get("description"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "org_admin": obj.get("org_admin") - }) + _obj = cls.model_validate( + { + "groupname": obj.get("groupname"), + "description": obj.get("description"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "org_admin": obj.get("org_admin"), + } + ) return _obj - - diff --git a/saturn_api/models/hardware_type.py b/saturn_api/models/hardware_type.py index 1dda3dc..856654e 100644 --- a/saturn_api/models/hardware_type.py +++ b/saturn_api/models/hardware_type.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class HardwareType(str, Enum): """ allowed enum values """ - CPU = 'CPU' - NVIDIA = 'NVIDIA' - AMD = 'AMD' + CPU = "CPU" + NVIDIA = "NVIDIA" + AMD = "AMD" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of HardwareType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/historic_log.py b/saturn_api/models/historic_log.py index 6c144c5..597a4dc 100644 --- a/saturn_api/models/historic_log.py +++ b/saturn_api/models/historic_log.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class HistoricLog(BaseModel): """ HistoricLog - """ # noqa: E501 + """ # noqa: E501 + timestamp: StrictStr = Field(description="Log timestamp.") content: StrictStr = Field(description="Content of the log.") pod_name: StrictStr = Field(description="Name of the pod the log came from.") @@ -38,7 +39,6 @@ class HistoricLog(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "timestamp", - "content", - "pod_name", - "container_name", - ]) + excluded_fields: Set[str] = set( + [ + "timestamp", + "content", + "pod_name", + "container_name", + ] + ) _dict = self.model_dump( by_alias=True, @@ -90,12 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timestamp": obj.get("timestamp"), - "content": obj.get("content"), - "pod_name": obj.get("pod_name"), - "container_name": obj.get("container_name") - }) + _obj = cls.model_validate( + { + "timestamp": obj.get("timestamp"), + "content": obj.get("content"), + "pod_name": obj.get("pod_name"), + "container_name": obj.get("container_name"), + } + ) return _obj - - diff --git a/saturn_api/models/historic_log_list.py b/saturn_api/models/historic_log_list.py index b5890e4..ab285b6 100644 --- a/saturn_api/models/historic_log_list.py +++ b/saturn_api/models/historic_log_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.historic_log import HistoricLog -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.historic_log import HistoricLog + + class HistoricLogList(BaseModel): """ HistoricLogList - """ # noqa: E501 + """ # noqa: E501 + logs: List[HistoricLog] = Field(description="List of logs.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class HistoricLogList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "logs", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "logs", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_logs in self.logs: if _item_logs: _items.append(_item_logs.to_dict()) - _dict['logs'] = _items + _dict["logs"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "logs": [HistoricLog.from_dict(_item) for _item in obj["logs"]] if obj.get("logs") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "logs": ( + [HistoricLog.from_dict(_item) for _item in obj["logs"]] + if obj.get("logs") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/hyperparameters.py b/saturn_api/models/hyperparameters.py new file mode 100644 index 0000000..0407bf4 --- /dev/null +++ b/saturn_api/models/hyperparameters.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set, Union + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing_extensions import Self + + +class Hyperparameters(BaseModel): + """ + Hyperparameters + """ # noqa: E501 + + learning_rate: Union[StrictFloat, StrictInt] + epochs: StrictInt + effective_batch_size: StrictInt + max_seq_length: StrictInt + lora_rank: StrictInt + lora_alpha: StrictInt + __properties: ClassVar[List[str]] = [ + "learning_rate", + "epochs", + "effective_batch_size", + "max_seq_length", + "lora_rank", + "lora_alpha", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Hyperparameters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "learning_rate", + "epochs", + "effective_batch_size", + "max_seq_length", + "lora_rank", + "lora_alpha", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Hyperparameters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "learning_rate": obj.get("learning_rate"), + "epochs": obj.get("epochs"), + "effective_batch_size": obj.get("effective_batch_size"), + "max_seq_length": obj.get("max_seq_length"), + "lora_rank": obj.get("lora_rank"), + "lora_alpha": obj.get("lora_alpha"), + } + ) + return _obj diff --git a/saturn_api/models/hyperparameters1.py b/saturn_api/models/hyperparameters1.py new file mode 100644 index 0000000..323662a --- /dev/null +++ b/saturn_api/models/hyperparameters1.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set, Union + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class Hyperparameters1(BaseModel): + """ + Hyperparameters1 + """ # noqa: E501 + + learning_rate: Union[ + Annotated[float, Field(le=1.0, strict=True, ge=0.0)], + Annotated[int, Field(le=1, strict=True, ge=0)], + ] = Field(description="Learning rate. Must be in (0, 1).") + epochs: Annotated[int, Field(le=10, strict=True, ge=1)] = Field( + description="Number of training epochs. Must be in [1, 10]." + ) + effective_batch_size: Annotated[int, Field(le=128, strict=True, ge=1)] = Field( + description="Effective batch size — the number of samples whose gradients are averaged per optimizer step. The platform translates this to axolotl's ``gradient_accumulation_steps × micro_batch_size``; ``micro_batch_size`` is auto-found at runtime to fit GPU memory." + ) + max_seq_length: Annotated[int, Field(le=16384, strict=True, ge=128)] = Field( + description="Maximum sequence length (tokens) per training sample. Longer sequences use proportionally more GPU memory. Must be in [128, 16384]." + ) + lora_rank: Annotated[int, Field(le=128, strict=True, ge=1)] = Field( + description="LoRA adapter rank. Must be in [1, 128]." + ) + lora_alpha: Annotated[int, Field(le=256, strict=True, ge=1)] = Field( + description="LoRA alpha scaling factor. Must be in [1, 256]." + ) + __properties: ClassVar[List[str]] = [ + "learning_rate", + "epochs", + "effective_batch_size", + "max_seq_length", + "lora_rank", + "lora_alpha", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Hyperparameters1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Hyperparameters1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "learning_rate": obj.get("learning_rate"), + "epochs": obj.get("epochs"), + "effective_batch_size": obj.get("effective_batch_size"), + "max_seq_length": obj.get("max_seq_length"), + "lora_rank": obj.get("lora_rank"), + "lora_alpha": obj.get("lora_alpha"), + } + ) + return _obj diff --git a/saturn_api/models/identity.py b/saturn_api/models/identity.py index c20caf7..19ea4b4 100644 --- a/saturn_api/models/identity.py +++ b/saturn_api/models/identity.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.identity_type import IdentityType -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity_type import IdentityType + + class Identity(BaseModel): """ Identity - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the user or group.") avatar_url: StrictStr = Field(description="Avatar URL for the user or group.") created_at: StrictStr = Field(description="Creation timestamp.") @@ -40,7 +42,6 @@ class Identity(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,12 +70,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "avatar_url", - "created_at", - "name", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "avatar_url", + "created_at", + "name", + ] + ) _dict = self.model_dump( by_alias=True, @@ -92,13 +95,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "avatar_url": obj.get("avatar_url"), - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "identity_type": obj.get("identity_type") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "avatar_url": obj.get("avatar_url"), + "created_at": obj.get("created_at"), + "name": obj.get("name"), + "identity_type": obj.get("identity_type"), + } + ) return _obj - - diff --git a/saturn_api/models/identity_by_group_id.py b/saturn_api/models/identity_by_group_id.py index 949f42f..f198838 100644 --- a/saturn_api/models/identity_by_group_id.py +++ b/saturn_api/models/identity_by_group_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class IdentityByGroupId(BaseModel): """ IdentityByGroupId - """ # noqa: E501 + """ # noqa: E501 + group_id: StrictStr = Field(description="Identity reference by group ID") __properties: ClassVar[List[str]] = ["group_id"] @@ -35,7 +36,6 @@ class IdentityByGroupId(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "group_id": obj.get("group_id") - }) + _obj = cls.model_validate({"group_id": obj.get("group_id")}) return _obj - - diff --git a/saturn_api/models/identity_by_user_id.py b/saturn_api/models/identity_by_user_id.py index 323113c..5fe5525 100644 --- a/saturn_api/models/identity_by_user_id.py +++ b/saturn_api/models/identity_by_user_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class IdentityByUserId(BaseModel): """ IdentityByUserId - """ # noqa: E501 + """ # noqa: E501 + user_id: StrictStr = Field(description="Identity reference by user ID") __properties: ClassVar[List[str]] = ["user_id"] @@ -35,7 +36,6 @@ class IdentityByUserId(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "user_id": obj.get("user_id") - }) + _obj = cls.model_validate({"user_id": obj.get("user_id")}) return _obj - - diff --git a/saturn_api/models/identity_reference.py b/saturn_api/models/identity_reference.py index e84590d..e4ffee0 100644 --- a/saturn_api/models/identity_reference.py +++ b/saturn_api/models/identity_reference.py @@ -1,37 +1,52 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from typing_extensions import Annotated +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Annotated, Literal, Self, TypeVar + from saturn_api.models.identity_by_group_id import IdentityByGroupId from saturn_api.models.identity_by_user_id import IdentityByUserId -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar IDENTITYREFERENCE_ONE_OF_SCHEMAS = ["IdentityByGroupId", "IdentityByUserId", "str"] -T = TypeVar("T", IdentityByGroupId, IdentityByUserId, str, default=Union[IdentityByGroupId, IdentityByUserId, str]) +T = TypeVar( + "T", + IdentityByGroupId, + IdentityByUserId, + str, + default=Union[IdentityByGroupId, IdentityByUserId, str], +) + class IdentityReference(RootModel[T]): """ IdentityReference """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -68,5 +83,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/identity_type.py b/saturn_api/models/identity_type.py index 3e023fb..851e85f 100644 --- a/saturn_api/models/identity_type.py +++ b/saturn_api/models/identity_type.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +27,10 @@ class IdentityType(str, Enum): """ allowed enum values """ - USER = 'user' - GROUP = 'group' + USER = "user" + GROUP = "group" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of IdentityType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/image.py b/saturn_api/models/image.py index 9b9a75a..55530af 100644 --- a/saturn_api/models/image.py +++ b/saturn_api/models/image.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image_access_level import ImageAccessLevel from saturn_api.models.owner import Owner -from typing import Literal, Optional, Set -from typing_extensions import Self + class Image(BaseModel): """ Image - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the image.") name: StrictStr = Field(description="Name of the image.") owner: Owner = Field(description="Owner of the image.") @@ -40,7 +42,19 @@ class Image(BaseModel): is_base: StrictBool = Field(description="True if the image is a base image for builds.") is_gpu: StrictBool = Field(description="True if the image support GPU hardware.") trusted: StrictBool = Field(description="True if the image belongs to a trusted source.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "description", "created_at", "hardware_type", "supports", "access", "is_base", "is_gpu", "trusted"] + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "description", + "created_at", + "hardware_type", + "supports", + "access", + "is_base", + "is_gpu", + "trusted", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +62,6 @@ class Image(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,17 +95,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "description", - "created_at", - "supports", - "is_base", - "is_gpu", - "trusted", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "description", + "created_at", + "supports", + "is_base", + "is_gpu", + "trusted", + ] + ) _dict = self.model_dump( by_alias=True, @@ -101,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -113,19 +128,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "hardware_type": obj.get("hardware_type"), - "supports": obj.get("supports"), - "access": obj.get("access"), - "is_base": obj.get("is_base"), - "is_gpu": obj.get("is_gpu"), - "trusted": obj.get("trusted") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "hardware_type": obj.get("hardware_type"), + "supports": obj.get("supports"), + "access": obj.get("access"), + "is_base": obj.get("is_base"), + "is_gpu": obj.get("is_gpu"), + "trusted": obj.get("trusted"), + } + ) return _obj - - diff --git a/saturn_api/models/image_access_level.py b/saturn_api/models/image_access_level.py index 8553fbc..234733f 100644 --- a/saturn_api/models/image_access_level.py +++ b/saturn_api/models/image_access_level.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class ImageAccessLevel(str, Enum): """ allowed enum values """ - ACCOUNT = 'account' - ORG = 'org' - OWNER = 'owner' + ACCOUNT = "account" + ORG = "org" + OWNER = "owner" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ImageAccessLevel from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/image_build_status.py b/saturn_api/models/image_build_status.py index 17dce57..6e3b6f7 100644 --- a/saturn_api/models/image_build_status.py +++ b/saturn_api/models/image_build_status.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,15 +27,13 @@ class ImageBuildStatus(str, Enum): """ allowed enum values """ - BUILT = 'built' - BUILDING = 'building' - ERROR = 'error' - PENDING = 'pending' - STOPPING = 'stopping' + BUILT = "built" + BUILDING = "building" + ERROR = "error" + PENDING = "pending" + STOPPING = "stopping" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ImageBuildStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/image_create.py b/saturn_api/models/image_create.py index f406df4..06a419f 100644 --- a/saturn_api/models/image_create.py +++ b/saturn_api/models/image_create.py @@ -1,41 +1,50 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image_access_level import ImageAccessLevel from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class ImageCreate(BaseModel): """ ImageCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the image.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the image.") - description: Optional[StrictStr] = Field(default='', description="Description of the image.") + description: Optional[StrictStr] = Field(default="", description="Description of the image.") hardware_type: Optional[HardwareType] = None supports: Optional[List[StrictStr]] = Field(default=None, description="Supported features.") access: Optional[ImageAccessLevel] = None - __properties: ClassVar[List[str]] = ["name", "owner", "description", "hardware_type", "supports", "access"] + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "hardware_type", + "supports", + "access", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +52,6 @@ class ImageCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,11 +85,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None return _dict @@ -95,14 +102,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description") if obj.get("description") is not None else '', - "hardware_type": obj.get("hardware_type"), - "supports": obj.get("supports"), - "access": obj.get("access") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description") if obj.get("description") is not None else "", + "hardware_type": obj.get("hardware_type"), + "supports": obj.get("supports"), + "access": obj.get("access"), + } + ) return _obj - - diff --git a/saturn_api/models/image_list.py b/saturn_api/models/image_list.py index 74fe5fc..45817f7 100644 --- a/saturn_api/models/image_list.py +++ b/saturn_api/models/image_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.image import Image -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.image import Image + + class ImageList(BaseModel): """ ImageList - """ # noqa: E501 + """ # noqa: E501 + images: List[Image] = Field(description="List of images.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ImageList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "images", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "images", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_images in self.images: if _item_images: _items.append(_item_images.to_dict()) - _dict['images'] = _items + _dict["images"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "images": [Image.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "images": ( + [Image.from_dict(_item) for _item in obj["images"]] + if obj.get("images") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/image_recipe.py b/saturn_api/models/image_recipe.py index 07fa122..17ba781 100644 --- a/saturn_api/models/image_recipe.py +++ b/saturn_api/models/image_recipe.py @@ -1,43 +1,45 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.image_spec import ImageSpec from saturn_api.models.image_state import ImageState -from typing import Literal, Optional, Set -from typing_extensions import Self + class ImageRecipe(BaseModel): """ ImageRecipe - """ # noqa: E501 - schema_version: Optional[StrictStr] = '2025.10.01' - type: Literal['image'] + """ # noqa: E501 + + schema_version: Optional[StrictStr] = "2025.10.01" + type: Literal["image"] spec: ImageSpec state: Optional[ImageState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['image']): + if value not in set(["image"]): raise ValueError("must be one of enum values ('image')") return value @@ -47,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,9 +74,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "state", - ]) + excluded_fields: Set[str] = set( + [ + "state", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +87,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict['spec'] = self.spec.to_dict() + _dict["spec"] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict['state'] = self.state.to_dict() + _dict["state"] = self.state.to_dict() return _dict @classmethod @@ -99,12 +102,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', - "type": obj.get("type"), - "spec": ImageSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, - "state": ImageState.from_dict(obj["state"]) if obj.get("state") is not None else None - }) + _obj = cls.model_validate( + { + "schema_version": ( + obj.get("schema_version") + if obj.get("schema_version") is not None + else "2025.10.01" + ), + "type": obj.get("type"), + "spec": ImageSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "state": ( + ImageState.from_dict(obj["state"]) if obj.get("state") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/image_spec.py b/saturn_api/models/image_spec.py index 263d51a..0883766 100644 --- a/saturn_api/models/image_spec.py +++ b/saturn_api/models/image_spec.py @@ -1,59 +1,69 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.image_tag_recipe import ImageTagRecipe from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class ImageSpec(BaseModel): """ ImageSpec - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr owner: Optional[OwnerReference] = None - description: Optional[StrictStr] = '' + description: Optional[StrictStr] = "" versions: Optional[List[ImageTagRecipe]] = None - hardware_type: Literal['CPU', 'NVIDIA', 'AMD'] = 'CPU' + hardware_type: Literal["CPU", "NVIDIA", "AMD"] = "CPU" supports: Optional[List[StrictStr]] = None - access: Literal['account', 'org', 'owner'] | None = None - __properties: ClassVar[List[str]] = ["name", "owner", "description", "versions", "hardware_type", "supports", "access"] - - @field_validator('hardware_type') + access: Literal["account", "org", "owner"] | None = None + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "versions", + "hardware_type", + "supports", + "access", + ] + + @field_validator("hardware_type") def hardware_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['CPU', 'NVIDIA', 'AMD']): + if value not in set(["CPU", "NVIDIA", "AMD"]): raise ValueError("must be one of enum values ('CPU', 'NVIDIA', 'AMD')") return value - @field_validator('access') + @field_validator("access") def access_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['account', 'org', 'owner']): + if value not in set(["account", "org", "owner"]): raise ValueError("must be one of enum values ('account', 'org', 'owner')") return value @@ -63,7 +73,6 @@ def access_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -88,8 +97,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -98,14 +106,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in versions (list) _items = [] if self.versions: for _item_versions in self.versions: if _item_versions: _items.append(_item_versions.to_dict()) - _dict['versions'] = _items + _dict["versions"] = _items return _dict @classmethod @@ -117,15 +125,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description") if obj.get("description") is not None else '', - "versions": [ImageTagRecipe.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None, - "hardware_type": obj.get("hardware_type") if obj.get("hardware_type") is not None else 'CPU', - "supports": obj.get("supports"), - "access": obj.get("access") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description") if obj.get("description") is not None else "", + "versions": ( + [ImageTagRecipe.from_dict(_item) for _item in obj["versions"]] + if obj.get("versions") is not None + else None + ), + "hardware_type": ( + obj.get("hardware_type") if obj.get("hardware_type") is not None else "CPU" + ), + "supports": obj.get("supports"), + "access": obj.get("access"), + } + ) return _obj - - diff --git a/saturn_api/models/image_state.py b/saturn_api/models/image_state.py index 16f7370..9ea0be7 100644 --- a/saturn_api/models/image_state.py +++ b/saturn_api/models/image_state.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.image_tag_state import ImageTagState -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.image_tag_state import ImageTagState + + class ImageState(BaseModel): """ ImageState - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr action: Optional[StrictStr] = None versions: Optional[List[ImageTagState]] = None @@ -38,7 +40,6 @@ class ImageState(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "action", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "action", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_versions in self.versions: if _item_versions: _items.append(_item_versions.to_dict()) - _dict['versions'] = _items + _dict["versions"] = _items return _dict @classmethod @@ -93,11 +96,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "action": obj.get("action"), - "versions": [ImageTagState.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "action": obj.get("action"), + "versions": ( + [ImageTagState.from_dict(_item) for _item in obj["versions"]] + if obj.get("versions") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag.py b/saturn_api/models/image_tag.py index 9168d07..d577a56 100644 --- a/saturn_api/models/image_tag.py +++ b/saturn_api/models/image_tag.py @@ -1,46 +1,67 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.build_data import BuildData from saturn_api.models.image import Image -from typing import Literal, Optional, Set -from typing_extensions import Self + class ImageTag(BaseModel): """ ImageTag - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the image tag.") created_at: StrictStr = Field(description="Creation timestamp.") image: Image = Field(description="Image that the tag belongs to.") image_uri: StrictStr = Field(description="Image URI for the tag.") description: StrictStr = Field(description="Description of the image tag") - version: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Version of the image tag.") - build_data: Optional[BuildData] = Field(default=None, description="Build data for the image tag.") - archived: StrictBool = Field(description="True if the image tag is archived. Archived tags are not attachable to new resources, but will continue to work on existing resources.") - is_external: StrictBool = Field(description="True if the image tag was imported from an external source.") + version: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Version of the image tag." + ) + build_data: Optional[BuildData] = Field( + default=None, description="Build data for the image tag." + ) + archived: StrictBool = Field( + description="True if the image tag is archived. Archived tags are not attachable to new resources, but will continue to work on existing resources." + ) + is_external: StrictBool = Field( + description="True if the image tag was imported from an external source." + ) status: StrictStr = Field(description="Status of the image tag build.") saturn_env: Optional[StrictStr] = Field(default=None, description="Dump of the build env.") - __properties: ClassVar[List[str]] = ["id", "created_at", "image", "image_uri", "description", "version", "build_data", "archived", "is_external", "status", "saturn_env"] + __properties: ClassVar[List[str]] = [ + "id", + "created_at", + "image", + "image_uri", + "description", + "version", + "build_data", + "archived", + "is_external", + "status", + "saturn_env", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +69,6 @@ class ImageTag(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,19 +104,21 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "image", - "image_uri", - "description", - "version", - "build_data", - "archived", - "is_external", - "status", - "saturn_env", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "image", + "image_uri", + "description", + "version", + "build_data", + "archived", + "is_external", + "status", + "saturn_env", + ] + ) _dict = self.model_dump( by_alias=True, @@ -105,10 +127,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict['image'] = self.image.to_dict() + _dict["image"] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of build_data if self.build_data: - _dict['build_data'] = self.build_data.to_dict() + _dict["build_data"] = self.build_data.to_dict() return _dict @classmethod @@ -120,19 +142,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None, - "image_uri": obj.get("image_uri"), - "description": obj.get("description"), - "version": obj.get("version"), - "build_data": BuildData.from_dict(obj["build_data"]) if obj.get("build_data") is not None else None, - "archived": obj.get("archived"), - "is_external": obj.get("is_external"), - "status": obj.get("status"), - "saturn_env": obj.get("saturn_env") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None, + "image_uri": obj.get("image_uri"), + "description": obj.get("description"), + "version": obj.get("version"), + "build_data": ( + BuildData.from_dict(obj["build_data"]) + if obj.get("build_data") is not None + else None + ), + "archived": obj.get("archived"), + "is_external": obj.get("is_external"), + "status": obj.get("status"), + "saturn_env": obj.get("saturn_env"), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_by_id.py b/saturn_api/models/image_tag_by_id.py index bace477..01a7abc 100644 --- a/saturn_api/models/image_tag_by_id.py +++ b/saturn_api/models/image_tag_by_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ImageTagById(BaseModel): """ ImageTagById - """ # noqa: E501 + """ # noqa: E501 + tag_id: StrictStr enforce_trusted: Optional[StrictBool] = True __properties: ClassVar[List[str]] = ["tag_id", "enforce_trusted"] @@ -36,7 +37,6 @@ class ImageTagById(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "tag_id": obj.get("tag_id"), - "enforce_trusted": obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True - }) + _obj = cls.model_validate( + { + "tag_id": obj.get("tag_id"), + "enforce_trusted": ( + obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True + ), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_by_name.py b/saturn_api/models/image_tag_by_name.py index 616ea3d..8241944 100644 --- a/saturn_api/models/image_tag_by_name.py +++ b/saturn_api/models/image_tag_by_name.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_reference import OwnerReference + + class ImageTagByName(BaseModel): """ ImageTagByName - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr version: StrictStr owner: Optional[OwnerReference] = None @@ -39,7 +41,6 @@ class ImageTagByName(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -86,12 +86,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "version": obj.get("version"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "enforce_trusted": obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "version": obj.get("version"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "enforce_trusted": ( + obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True + ), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_by_uri.py b/saturn_api/models/image_tag_by_uri.py index 10c140d..14cd58d 100644 --- a/saturn_api/models/image_tag_by_uri.py +++ b/saturn_api/models/image_tag_by_uri.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_reference import OwnerReference + + class ImageTagByUri(BaseModel): """ ImageTagByUri - """ # noqa: E501 + """ # noqa: E501 + uri: StrictStr owner: Optional[OwnerReference] = None enforce_trusted: Optional[StrictBool] = True @@ -38,7 +40,6 @@ class ImageTagByUri(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -85,11 +85,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "uri": obj.get("uri"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "enforce_trusted": obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True - }) + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "enforce_trusted": ( + obj.get("enforce_trusted") if obj.get("enforce_trusted") is not None else True + ), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_create.py b/saturn_api/models/image_tag_create.py index cf9b6ea..e08c63a 100644 --- a/saturn_api/models/image_tag_create.py +++ b/saturn_api/models/image_tag_create.py @@ -1,36 +1,51 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.image_tag_create_build import ImageTagCreateBuild from saturn_api.models.image_tag_create_external import ImageTagCreateExternal -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar IMAGETAGCREATE_ONE_OF_SCHEMAS = ["ImageTagCreateBuild", "ImageTagCreateExternal"] -T = TypeVar("T", ImageTagCreateBuild, ImageTagCreateExternal, default=Union[ImageTagCreateBuild, ImageTagCreateExternal]) +T = TypeVar( + "T", + ImageTagCreateBuild, + ImageTagCreateExternal, + default=Union[ImageTagCreateBuild, ImageTagCreateExternal], +) + class ImageTagCreate(RootModel[T]): """ ImageTagCreate """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -67,5 +82,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/image_tag_create_build.py b/saturn_api/models/image_tag_create_build.py index f65470b..bf1c425 100644 --- a/saturn_api/models/image_tag_create_build.py +++ b/saturn_api/models/image_tag_create_build.py @@ -1,36 +1,43 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.build_data import BuildData -from typing import Literal, Optional, Set -from typing_extensions import Self + class ImageTagCreateBuild(BaseModel): """ ImageTagCreateBuild - """ # noqa: E501 - version: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Version of the image tag.") - description: Optional[StrictStr] = Field(default='', description="Description of the image tag.") - build_data: Optional[BuildData] = Field(default=None, description="Build data for the image tag.") + """ # noqa: E501 + + version: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Version of the image tag." + ) + description: Optional[StrictStr] = Field( + default="", description="Description of the image tag." + ) + build_data: Optional[BuildData] = Field( + default=None, description="Build data for the image tag." + ) __properties: ClassVar[List[str]] = ["version", "description", "build_data"] model_config = ConfigDict( @@ -39,7 +46,6 @@ class ImageTagCreateBuild(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of build_data if self.build_data: - _dict['build_data'] = self.build_data.to_dict() + _dict["build_data"] = self.build_data.to_dict() return _dict @classmethod @@ -86,11 +91,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "version": obj.get("version"), - "description": obj.get("description") if obj.get("description") is not None else '', - "build_data": BuildData.from_dict(obj["build_data"]) if obj.get("build_data") is not None else None - }) + _obj = cls.model_validate( + { + "version": obj.get("version"), + "description": obj.get("description") if obj.get("description") is not None else "", + "build_data": ( + BuildData.from_dict(obj["build_data"]) + if obj.get("build_data") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_create_external.py b/saturn_api/models/image_tag_create_external.py index 254a0a3..b23b555 100644 --- a/saturn_api/models/image_tag_create_external.py +++ b/saturn_api/models/image_tag_create_external.py @@ -1,34 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ImageTagCreateExternal(BaseModel): """ ImageTagCreateExternal - """ # noqa: E501 + """ # noqa: E501 + image_uri: StrictStr = Field(description="External image URI") - version: Optional[StrictStr] = Field(default='', description="Version of the image tag.") - description: Optional[StrictStr] = Field(default='', description="Description of the image tag.") + version: Optional[StrictStr] = Field(default="", description="Version of the image tag.") + description: Optional[StrictStr] = Field( + default="", description="Description of the image tag." + ) __properties: ClassVar[List[str]] = ["image_uri", "version", "description"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class ImageTagCreateExternal(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "image_uri": obj.get("image_uri"), - "version": obj.get("version") if obj.get("version") is not None else '', - "description": obj.get("description") if obj.get("description") is not None else '' - }) + _obj = cls.model_validate( + { + "image_uri": obj.get("image_uri"), + "version": obj.get("version") if obj.get("version") is not None else "", + "description": obj.get("description") if obj.get("description") is not None else "", + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_list.py b/saturn_api/models/image_tag_list.py index 42c2fe9..c260cec 100644 --- a/saturn_api/models/image_tag_list.py +++ b/saturn_api/models/image_tag_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.image_tag import ImageTag -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.image_tag import ImageTag + + class ImageTagList(BaseModel): """ ImageTagList - """ # noqa: E501 + """ # noqa: E501 + image_tags: List[ImageTag] = Field(description="List of image tags.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ImageTagList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "image_tags", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "image_tags", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_image_tags in self.image_tags: if _item_image_tags: _items.append(_item_image_tags.to_dict()) - _dict['image_tags'] = _items + _dict["image_tags"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "image_tags": [ImageTag.from_dict(_item) for _item in obj["image_tags"]] if obj.get("image_tags") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "image_tags": ( + [ImageTag.from_dict(_item) for _item in obj["image_tags"]] + if obj.get("image_tags") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_recipe.py b/saturn_api/models/image_tag_recipe.py index 1715161..4399b9b 100644 --- a/saturn_api/models/image_tag_recipe.py +++ b/saturn_api/models/image_tag_recipe.py @@ -1,37 +1,44 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ImageTagRecipe(BaseModel): """ ImageTagRecipe - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr image_uri: StrictStr description: Optional[StrictStr] = None archived: Optional[StrictBool] = False build_data: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["name", "image_uri", "description", "archived", "build_data"] + __properties: ClassVar[List[str]] = [ + "name", + "image_uri", + "description", + "archived", + "build_data", + ] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +46,6 @@ class ImageTagRecipe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -83,13 +88,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "image_uri": obj.get("image_uri"), - "description": obj.get("description"), - "archived": obj.get("archived") if obj.get("archived") is not None else False, - "build_data": obj.get("build_data") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "image_uri": obj.get("image_uri"), + "description": obj.get("description"), + "archived": obj.get("archived") if obj.get("archived") is not None else False, + "build_data": obj.get("build_data"), + } + ) return _obj - - diff --git a/saturn_api/models/image_tag_reference.py b/saturn_api/models/image_tag_reference.py index 7c90806..b99a7ed 100644 --- a/saturn_api/models/image_tag_reference.py +++ b/saturn_api/models/image_tag_reference.py @@ -1,37 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.image_tag_by_id import ImageTagById from saturn_api.models.image_tag_by_name import ImageTagByName from saturn_api.models.image_tag_by_uri import ImageTagByUri -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar IMAGETAGREFERENCE_ONE_OF_SCHEMAS = ["ImageTagById", "ImageTagByName", "ImageTagByUri", "str"] -T = TypeVar("T", ImageTagById, ImageTagByName, ImageTagByUri, str, default=Union[ImageTagById, ImageTagByName, ImageTagByUri, str]) +T = TypeVar( + "T", + ImageTagById, + ImageTagByName, + ImageTagByUri, + str, + default=Union[ImageTagById, ImageTagByName, ImageTagByUri, str], +) + class ImageTagReference(RootModel[T]): """ ImageTagReference """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -68,5 +85,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/image_tag_state.py b/saturn_api/models/image_tag_state.py index 03099ad..4f7bcc1 100644 --- a/saturn_api/models/image_tag_state.py +++ b/saturn_api/models/image_tag_state.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ImageTagState(BaseModel): """ ImageTagState - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr action: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "action"] @@ -36,7 +37,6 @@ class ImageTagState(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,10 +63,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "action", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "action", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +86,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "action": obj.get("action") - }) + _obj = cls.model_validate({"id": obj.get("id"), "action": obj.get("action")}) return _obj - - diff --git a/saturn_api/models/image_tag_update.py b/saturn_api/models/image_tag_update.py index 784d377..94455cd 100644 --- a/saturn_api/models/image_tag_update.py +++ b/saturn_api/models/image_tag_update.py @@ -1,34 +1,40 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ImageTagUpdate(BaseModel): """ ImageTagUpdate - """ # noqa: E501 - description: Optional[StrictStr] = Field(default=None, description="Description of the image tag.") + """ # noqa: E501 + + description: Optional[StrictStr] = Field( + default=None, description="Description of the image tag." + ) version: Optional[StrictStr] = Field(default=None, description="Version of the image tag.") - archived: Optional[StrictBool] = Field(default=None, description="Archive the image tag. Archived tags are not attachable to new resources, but will continue to work on existing resources.") + archived: Optional[StrictBool] = Field( + default=None, + description="Archive the image tag. Archived tags are not attachable to new resources, but will continue to work on existing resources.", + ) __properties: ClassVar[List[str]] = ["description", "version", "archived"] model_config = ConfigDict( @@ -37,7 +43,6 @@ class ImageTagUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,11 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "description": obj.get("description"), - "version": obj.get("version"), - "archived": obj.get("archived") - }) + _obj = cls.model_validate( + { + "description": obj.get("description"), + "version": obj.get("version"), + "archived": obj.get("archived"), + } + ) return _obj - - diff --git a/saturn_api/models/image_update.py b/saturn_api/models/image_update.py index b866de2..3ad08b7 100644 --- a/saturn_api/models/image_update.py +++ b/saturn_api/models/image_update.py @@ -1,39 +1,47 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.hardware_type import HardwareType from saturn_api.models.image_access_level import ImageAccessLevel -from typing import Literal, Optional, Set -from typing_extensions import Self + class ImageUpdate(BaseModel): """ ImageUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the image.") description: Optional[StrictStr] = Field(default=None, description="Description of the image.") hardware_type: Optional[HardwareType] = None supports: Optional[List[StrictStr]] = Field(default=None, description="Supported features.") access: Optional[ImageAccessLevel] = None - __properties: ClassVar[List[str]] = ["name", "description", "hardware_type", "supports", "access"] + __properties: ClassVar[List[str]] = [ + "name", + "description", + "hardware_type", + "supports", + "access", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +49,6 @@ class ImageUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None return _dict @@ -90,13 +96,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "hardware_type": obj.get("hardware_type"), - "supports": obj.get("supports"), - "access": obj.get("access") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "hardware_type": obj.get("hardware_type"), + "supports": obj.get("supports"), + "access": obj.get("access"), + } + ) return _obj - - diff --git a/saturn_api/models/instance_size.py b/saturn_api/models/instance_size.py index 99d7d0d..53d0aba 100644 --- a/saturn_api/models/instance_size.py +++ b/saturn_api/models/instance_size.py @@ -1,32 +1,41 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, +) +from typing_extensions import Self -from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union from saturn_api.models.hardware_type import HardwareType -from typing import Literal, Optional, Set -from typing_extensions import Self + class InstanceSize(BaseModel): """ InstanceSize - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr cores: StrictInt memory: StrictStr @@ -37,10 +46,24 @@ class InstanceSize(BaseModel): display: StrictStr display_name: StrictStr price_per_hour: Optional[Union[StrictFloat, StrictInt]] = None - description: Optional[StrictStr] = '' + description: Optional[StrictStr] = "" disabled: Optional[StrictBool] = False - disabled_message: Optional[StrictStr] = '' - __properties: ClassVar[List[str]] = ["name", "cores", "memory", "gpu", "gpu_type", "hardware_type", "cloud", "display", "display_name", "price_per_hour", "description", "disabled", "disabled_message"] + disabled_message: Optional[StrictStr] = "" + __properties: ClassVar[List[str]] = [ + "name", + "cores", + "memory", + "gpu", + "gpu_type", + "hardware_type", + "cloud", + "display", + "display_name", + "price_per_hour", + "description", + "disabled", + "disabled_message", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +71,6 @@ class InstanceSize(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,9 +96,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "display", - ]) + excluded_fields: Set[str] = set( + [ + "display", + ] + ) _dict = self.model_dump( by_alias=True, @@ -86,12 +110,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if gpu_type (nullable) is None # and model_fields_set contains the field if self.gpu_type is None and "gpu_type" in self.model_fields_set: - _dict['gpu_type'] = None + _dict["gpu_type"] = None # set to None if price_per_hour (nullable) is None # and model_fields_set contains the field if self.price_per_hour is None and "price_per_hour" in self.model_fields_set: - _dict['price_per_hour'] = None + _dict["price_per_hour"] = None return _dict @@ -104,21 +128,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "cores": obj.get("cores"), - "memory": obj.get("memory"), - "gpu": obj.get("gpu") if obj.get("gpu") is not None else 0, - "gpu_type": obj.get("gpu_type"), - "hardware_type": obj.get("hardware_type"), - "cloud": obj.get("cloud"), - "display": obj.get("display"), - "display_name": obj.get("display_name"), - "price_per_hour": obj.get("price_per_hour"), - "description": obj.get("description") if obj.get("description") is not None else '', - "disabled": obj.get("disabled") if obj.get("disabled") is not None else False, - "disabled_message": obj.get("disabled_message") if obj.get("disabled_message") is not None else '' - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "cores": obj.get("cores"), + "memory": obj.get("memory"), + "gpu": obj.get("gpu") if obj.get("gpu") is not None else 0, + "gpu_type": obj.get("gpu_type"), + "hardware_type": obj.get("hardware_type"), + "cloud": obj.get("cloud"), + "display": obj.get("display"), + "display_name": obj.get("display_name"), + "price_per_hour": obj.get("price_per_hour"), + "description": obj.get("description") if obj.get("description") is not None else "", + "disabled": obj.get("disabled") if obj.get("disabled") is not None else False, + "disabled_message": ( + obj.get("disabled_message") if obj.get("disabled_message") is not None else "" + ), + } + ) return _obj - - diff --git a/saturn_api/models/invitation.py b/saturn_api/models/invitation.py index eaf9fa4..f782667 100644 --- a/saturn_api/models/invitation.py +++ b/saturn_api/models/invitation.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.user import User -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.user import User + + class Invitation(BaseModel): """ Invitation - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the invitation.") email: StrictStr = Field(description="Email that the invitation is sent to") invitee_name: Optional[StrictStr] = Field(description="Name of the person being invited.") @@ -34,7 +36,15 @@ class Invitation(BaseModel): invitor_name: Optional[StrictStr] = Field(description="Name of the person sending the invite.") status: StrictStr = Field(description="Status of the invitation.") created_at: StrictStr = Field(description="Creation timestamp.") - __properties: ClassVar[List[str]] = ["id", "email", "invitee_name", "invitor", "invitor_name", "status", "created_at"] + __properties: ClassVar[List[str]] = [ + "id", + "email", + "invitee_name", + "invitor", + "invitor_name", + "status", + "created_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +52,6 @@ class Invitation(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,15 +83,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "email", - "invitee_name", - "invitor", - "invitor_name", - "status", - "created_at", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "email", + "invitee_name", + "invitor", + "invitor_name", + "status", + "created_at", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,16 +102,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitor if self.invitor: - _dict['invitor'] = self.invitor.to_dict() + _dict["invitor"] = self.invitor.to_dict() # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict['invitee_name'] = None + _dict["invitee_name"] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict['invitor_name'] = None + _dict["invitor_name"] = None return _dict @@ -113,15 +124,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor": User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None, - "invitor_name": obj.get("invitor_name"), - "status": obj.get("status"), - "created_at": obj.get("created_at") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor": ( + User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None + ), + "invitor_name": obj.get("invitor_name"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + } + ) return _obj - - diff --git a/saturn_api/models/invitation_create.py b/saturn_api/models/invitation_create.py index 639e86f..28c567c 100644 --- a/saturn_api/models/invitation_create.py +++ b/saturn_api/models/invitation_create.py @@ -1,34 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class InvitationCreate(BaseModel): """ InvitationCreate - """ # noqa: E501 + """ # noqa: E501 + email: StrictStr = Field(description="Email that the invitation is sent to.") invitee_name: Optional[StrictStr] = None - invitor_name: Optional[StrictStr] = Field(default=None, description="Name of the person sending the invite.") + invitor_name: Optional[StrictStr] = Field( + default=None, description="Name of the person sending the invite." + ) __properties: ClassVar[List[str]] = ["email", "invitee_name", "invitor_name"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class InvitationCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,12 +74,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict['invitee_name'] = None + _dict["invitee_name"] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict['invitor_name'] = None + _dict["invitor_name"] = None return _dict @@ -91,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor_name": obj.get("invitor_name") - }) + _obj = cls.model_validate( + { + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor_name": obj.get("invitor_name"), + } + ) return _obj - - diff --git a/saturn_api/models/invitation_list.py b/saturn_api/models/invitation_list.py index 7b5e1eb..824a797 100644 --- a/saturn_api/models/invitation_list.py +++ b/saturn_api/models/invitation_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.invitation import Invitation -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.invitation import Invitation + + class InvitationList(BaseModel): """ InvitationList - """ # noqa: E501 + """ # noqa: E501 + invitations: List[Invitation] = Field(description="List of invitations.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class InvitationList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "invitations", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "invitations", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_invitations in self.invitations: if _item_invitations: _items.append(_item_invitations.to_dict()) - _dict['invitations'] = _items + _dict["invitations"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "invitations": [Invitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "invitations": ( + [Invitation.from_dict(_item) for _item in obj["invitations"]] + if obj.get("invitations") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/invitation_status.py b/saturn_api/models/invitation_status.py index 8dc38a2..8aa73b1 100644 --- a/saturn_api/models/invitation_status.py +++ b/saturn_api/models/invitation_status.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class InvitationStatus(str, Enum): """ allowed enum values """ - PENDING = 'pending' - APPROVED = 'approved' - REJECTED = 'rejected' + PENDING = "pending" + APPROVED = "approved" + REJECTED = "rejected" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InvitationStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/invitation_update.py b/saturn_api/models/invitation_update.py index 1de167f..a81e990 100644 --- a/saturn_api/models/invitation_update.py +++ b/saturn_api/models/invitation_update.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from saturn_api.models.invitation_status import InvitationStatus -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.invitation_status import InvitationStatus + + class InvitationUpdate(BaseModel): """ InvitationUpdate - """ # noqa: E501 + """ # noqa: E501 + status: InvitationStatus __properties: ClassVar[List[str]] = ["status"] @@ -36,7 +38,6 @@ class InvitationUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "status": obj.get("status") - }) + _obj = cls.model_validate({"status": obj.get("status")}) return _obj - - diff --git a/saturn_api/models/job.py b/saturn_api/models/job.py index f2b76f8..ca9bf51 100644 --- a/saturn_api/models/job.py +++ b/saturn_api/models/job.py @@ -1,71 +1,129 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) +from typing_extensions import Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.cron_schedule import CronSchedule from saturn_api.models.dask_cluster_nested import DaskClusterNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.image_tag import ImageTag from saturn_api.models.owner import Owner -from typing import Literal, Optional, Set -from typing_extensions import Self + class Job(BaseModel): """ Job - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the job.") name: StrictStr = Field(description="Name of the job.") owner: Owner = Field(description="Owner of the job.") command: StrictStr = Field(description="Command that runs on start.") description: StrictStr = Field(description="Description of the job.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the job.") + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the job." + ) instance_size: StrictStr = Field(description="Instance size of the job.") image_tag: ImageTag = Field(description="Image tag that is attached to the job.") - extra_packages: Optional[ExtraPackages] = Field(description="Addtitional packages to install on start.") - cron_schedule_options: Optional[CronSchedule] = Field(default=None, description="Cron schedule configuration for scheduled jobs.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") - environment_variables: Dict[str, StrictStr] = Field(description="Mapping of environment variable keys to values.") + extra_packages: Optional[ExtraPackages] = Field( + description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, Dict[str, StrictStr]]] = Field( + default=None, description="User-defined config files written to $HOME at pod startup." + ) + cron_schedule_options: Optional[CronSchedule] = Field( + default=None, description="Cron schedule configuration for scheduled jobs." + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script that runs on start before the primary command." + ) + environment_variables: Dict[str, StrictStr] = Field( + description="Mapping of environment variable keys to values." + ) working_dir: StrictStr = Field(description="Initial working directory.") is_spot: StrictBool = Field(description="Enables running on spot instance sizes.") start_dind: StrictBool = Field(description="Enables docker-in-docker.") scale: StrictInt = Field(description="Number of pod replicas.") retries: StrictInt = Field(description="Maximum number of retries for a failed job.") k8s_name: StrictStr = Field(description="Unique name for associated kubernetes objects.") - require_restart: StrictBool = Field(description="True if an update was applied that requires restart to take effect.") - resource_type: Literal['job'] + require_restart: StrictBool = Field( + description="True if an update was applied that requires restart to take effect." + ) + resource_type: Literal["job"] size_display: StrictStr = Field(description="Description of the instance size.") created_at: StrictStr = Field(description="Creation timestamp.") updated_at: StrictStr = Field(description="Update timestamp.") last_deploy: StrictStr = Field(description="Last started timestamp.") - dask_cluster: Optional[DaskClusterNested] = Field(default=None, description="Dask cluster attached to the job.") + dask_cluster: Optional[DaskClusterNested] = Field( + default=None, description="Dask cluster attached to the job." + ) status: StrictStr = Field(description="Current status of the job.") running_count: StrictInt = Field(description="Number of running pods.") debug_mode: StrictBool = Field(description="True if job is running in debug mode.") scheduled: StrictBool = Field(description="True if job is currently scheduled.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "command", "description", "tags", "instance_size", "image_tag", "extra_packages", "cron_schedule_options", "start_script", "environment_variables", "working_dir", "is_spot", "start_dind", "scale", "retries", "k8s_name", "require_restart", "resource_type", "size_display", "created_at", "updated_at", "last_deploy", "dask_cluster", "status", "running_count", "debug_mode", "scheduled"] + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "command", + "description", + "tags", + "instance_size", + "image_tag", + "extra_packages", + "config_files", + "cron_schedule_options", + "start_script", + "environment_variables", + "working_dir", + "is_spot", + "start_dind", + "scale", + "retries", + "k8s_name", + "require_restart", + "resource_type", + "size_display", + "created_at", + "updated_at", + "last_deploy", + "dask_cluster", + "status", + "running_count", + "debug_mode", + "scheduled", + ] - @field_validator('resource_type') + @field_validator("resource_type") def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['job']): + if value not in set(["job"]): raise ValueError("must be one of enum values ('job')") return value @@ -75,7 +133,6 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -127,37 +184,41 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "command", - "description", - "instance_size", - "image_tag", - "extra_packages", - "cron_schedule_options", - "start_script", - "environment_variables", - "working_dir", - "is_spot", - "start_dind", - "scale", - "retries", - "k8s_name", - "require_restart", - "resource_type", - "size_display", - "created_at", - "updated_at", - "last_deploy", - "dask_cluster", - "status", - "running_count", - "debug_mode", - "scheduled", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "command", + "description", + "instance_size", + "image_tag", + "extra_packages", + "config_files", + "cron_schedule_options", + "start_script", + "environment_variables", + "working_dir", + "is_spot", + "start_dind", + "scale", + "retries", + "k8s_name", + "require_restart", + "resource_type", + "size_display", + "created_at", + "updated_at", + "last_deploy", + "dask_cluster", + "status", + "running_count", + "debug_mode", + "scheduled", + ] + ) _dict = self.model_dump( by_alias=True, @@ -166,33 +227,38 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image_tag if self.image_tag: - _dict['image_tag'] = self.image_tag.to_dict() + _dict["image_tag"] = self.image_tag.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of cron_schedule_options if self.cron_schedule_options: - _dict['cron_schedule_options'] = self.cron_schedule_options.to_dict() + _dict["cron_schedule_options"] = self.cron_schedule_options.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict['dask_cluster'] = self.dask_cluster.to_dict() + _dict["dask_cluster"] = self.dask_cluster.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None return _dict @@ -205,37 +271,54 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "command": obj.get("command"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_tag": ImageTag.from_dict(obj["image_tag"]) if obj.get("image_tag") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "cron_schedule_options": CronSchedule.from_dict(obj["cron_schedule_options"]) if obj.get("cron_schedule_options") is not None else None, - "start_script": obj.get("start_script"), - "environment_variables": obj.get("environment_variables"), - "working_dir": obj.get("working_dir"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "scale": obj.get("scale"), - "retries": obj.get("retries"), - "k8s_name": obj.get("k8s_name"), - "require_restart": obj.get("require_restart"), - "resource_type": obj.get("resource_type"), - "size_display": obj.get("size_display"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "last_deploy": obj.get("last_deploy"), - "dask_cluster": DaskClusterNested.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, - "status": obj.get("status"), - "running_count": obj.get("running_count"), - "debug_mode": obj.get("debug_mode"), - "scheduled": obj.get("scheduled") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "command": obj.get("command"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_tag": ( + ImageTag.from_dict(obj["image_tag"]) + if obj.get("image_tag") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": obj.get("config_files"), + "cron_schedule_options": ( + CronSchedule.from_dict(obj["cron_schedule_options"]) + if obj.get("cron_schedule_options") is not None + else None + ), + "start_script": obj.get("start_script"), + "environment_variables": obj.get("environment_variables"), + "working_dir": obj.get("working_dir"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "scale": obj.get("scale"), + "retries": obj.get("retries"), + "k8s_name": obj.get("k8s_name"), + "require_restart": obj.get("require_restart"), + "resource_type": obj.get("resource_type"), + "size_display": obj.get("size_display"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "last_deploy": obj.get("last_deploy"), + "dask_cluster": ( + DaskClusterNested.from_dict(obj["dask_cluster"]) + if obj.get("dask_cluster") is not None + else None + ), + "status": obj.get("status"), + "running_count": obj.get("running_count"), + "debug_mode": obj.get("debug_mode"), + "scheduled": obj.get("scheduled"), + } + ) return _obj - - diff --git a/saturn_api/models/job_create.py b/saturn_api/models/job_create.py index f077162..9c646be 100644 --- a/saturn_api/models/job_create.py +++ b/saturn_api/models/job_create.py @@ -1,56 +1,113 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry from saturn_api.models.cron_schedule_create import CronScheduleCreate -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class JobCreate(BaseModel): """ JobCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the job.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the job.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the job.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the job.") - instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the job.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default="", description="Description of the job." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the job." + ) + instance_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the job." + ) image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") - environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments for the job.") - extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script to run on start before the primary command.") - working_dir: Optional[StrictStr] = Field(default='/home/jovyan/workspace', description="Initial working directory for the job.") - is_spot: Optional[StrictBool] = Field(default=False, description="Enables running on spot instance sizes.") + image_enforce_trusted: Optional[StrictBool] = Field( + default=True, description="Enable image trust validation before attaching." + ) + environment_variables: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Mapping of environment variable keys to values." + ) + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( + default=None, description="List of external repo attachments for the job." + ) + extra_packages: Optional[ExtraPackages] = Field( + default=None, description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, ConfigFileEntry]] = Field( + default=None, + description="User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode.", + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script to run on start before the primary command." + ) + working_dir: Optional[StrictStr] = Field( + default="/home/jovyan/workspace", description="Initial working directory for the job." + ) + is_spot: Optional[StrictBool] = Field( + default=False, description="Enables running on spot instance sizes." + ) start_dind: Optional[StrictBool] = Field(default=False, description="Enables docker-in-docker.") - command: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Command that runs on start.") - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Number of pod replicas.") - retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=0, description="Maximum number of retries for a failed job.") - cron_schedule_options: Optional[CronScheduleCreate] = Field(default=None, description="Cron schedule configuration for scheduled jobs.") - __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "instance_size", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "is_spot", "start_dind", "command", "scale", "retries", "cron_schedule_options"] + command: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Command that runs on start." + ) + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( + default=1, description="Number of pod replicas." + ) + retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Maximum number of retries for a failed job." + ) + cron_schedule_options: Optional[CronScheduleCreate] = Field( + default=None, description="Cron schedule configuration for scheduled jobs." + ) + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "tags", + "instance_size", + "image_uri", + "image_tag_id", + "image_enforce_trusted", + "environment_variables", + "external_repo_attachments", + "extra_packages", + "config_files", + "start_script", + "working_dir", + "is_spot", + "start_dind", + "command", + "scale", + "retries", + "cron_schedule_options", + ] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +115,6 @@ class JobCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,8 +139,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -93,49 +148,64 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in external_repo_attachments (list) _items = [] if self.external_repo_attachments: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # override the default output from pydantic by calling `to_dict()` of cron_schedule_options if self.cron_schedule_options: - _dict['cron_schedule_options'] = self.cron_schedule_options.to_dict() + _dict["cron_schedule_options"] = self.cron_schedule_options.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if environment_variables (nullable) is None # and model_fields_set contains the field if self.environment_variables is None and "environment_variables" in self.model_fields_set: - _dict['environment_variables'] = None + _dict["environment_variables"] = None # set to None if external_repo_attachments (nullable) is None # and model_fields_set contains the field - if self.external_repo_attachments is None and "external_repo_attachments" in self.model_fields_set: - _dict['external_repo_attachments'] = None + if ( + self.external_repo_attachments is None + and "external_repo_attachments" in self.model_fields_set + ): + _dict["external_repo_attachments"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if cron_schedule_options (nullable) is None # and model_fields_set contains the field if self.cron_schedule_options is None and "cron_schedule_options" in self.model_fields_set: - _dict['cron_schedule_options'] = None + _dict["cron_schedule_options"] = None return _dict @@ -148,27 +218,60 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description") if obj.get("description") is not None else '', - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir") if obj.get("working_dir") is not None else '/home/jovyan/workspace', - "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, - "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "retries": obj.get("retries") if obj.get("retries") is not None else 0, - "cron_schedule_options": CronScheduleCreate.from_dict(obj["cron_schedule_options"]) if obj.get("cron_schedule_options") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description") if obj.get("description") is not None else "", + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": ( + obj.get("image_enforce_trusted") + if obj.get("image_enforce_trusted") is not None + else True + ), + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": ( + [ + ExternalRepoAttachmentNested.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "working_dir": ( + obj.get("working_dir") + if obj.get("working_dir") is not None + else "/home/jovyan/workspace" + ), + "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, + "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "retries": obj.get("retries") if obj.get("retries") is not None else 0, + "cron_schedule_options": ( + CronScheduleCreate.from_dict(obj["cron_schedule_options"]) + if obj.get("cron_schedule_options") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/job_list.py b/saturn_api/models/job_list.py index 2d6645f..9dbfc23 100644 --- a/saturn_api/models/job_list.py +++ b/saturn_api/models/job_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.job import Job -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.job import Job + + class JobList(BaseModel): """ JobList - """ # noqa: E501 + """ # noqa: E501 + jobs: List[Job] = Field(description="List of jobs.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class JobList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "jobs", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "jobs", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_jobs in self.jobs: if _item_jobs: _items.append(_item_jobs.to_dict()) - _dict['jobs'] = _items + _dict["jobs"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "jobs": [Job.from_dict(_item) for _item in obj["jobs"]] if obj.get("jobs") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "jobs": ( + [Job.from_dict(_item) for _item in obj["jobs"]] + if obj.get("jobs") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/job_recipe.py b/saturn_api/models/job_recipe.py index e6026b0..02f5afb 100644 --- a/saturn_api/models/job_recipe.py +++ b/saturn_api/models/job_recipe.py @@ -1,43 +1,45 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.job_spec import JobSpec from saturn_api.models.resource_state import ResourceState -from typing import Literal, Optional, Set -from typing_extensions import Self + class JobRecipe(BaseModel): """ JobRecipe - """ # noqa: E501 - schema_version: Optional[StrictStr] = '2025.10.01' - type: Literal['job'] + """ # noqa: E501 + + schema_version: Optional[StrictStr] = "2025.10.01" + type: Literal["job"] spec: JobSpec state: Optional[ResourceState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['job']): + if value not in set(["job"]): raise ValueError("must be one of enum values ('job')") return value @@ -47,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,9 +74,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "state", - ]) + excluded_fields: Set[str] = set( + [ + "state", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +87,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict['spec'] = self.spec.to_dict() + _dict["spec"] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict['state'] = self.state.to_dict() + _dict["state"] = self.state.to_dict() return _dict @classmethod @@ -99,12 +102,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', - "type": obj.get("type"), - "spec": JobSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, - "state": ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None - }) + _obj = cls.model_validate( + { + "schema_version": ( + obj.get("schema_version") + if obj.get("schema_version") is not None + else "2025.10.01" + ), + "type": obj.get("type"), + "spec": JobSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "state": ( + ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/job_restart.py b/saturn_api/models/job_restart.py index 4e4eaae..2701a43 100644 --- a/saturn_api/models/job_restart.py +++ b/saturn_api/models/job_restart.py @@ -1,32 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class JobRestart(BaseModel): """ JobRestart - """ # noqa: E501 - debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.") + """ # noqa: E501 + + debug_mode: Optional[StrictBool] = Field( + default=None, + description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.", + ) __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -35,7 +39,6 @@ class JobRestart(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "debug_mode": obj.get("debug_mode") - }) + _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) return _obj - - diff --git a/saturn_api/models/job_runtime_summary.py b/saturn_api/models/job_runtime_summary.py index 693afa6..f25112a 100644 --- a/saturn_api/models/job_runtime_summary.py +++ b/saturn_api/models/job_runtime_summary.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.condition import Condition from saturn_api.models.job_status import JobStatus -from typing import Literal, Optional, Set -from typing_extensions import Self + class JobRuntimeSummary(BaseModel): """ JobRuntimeSummary - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr namespace: StrictStr uid: StrictStr @@ -44,7 +46,23 @@ class JobRuntimeSummary(BaseModel): running_count: StrictInt active_count: StrictInt completed_at: Optional[datetime] - __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "scale", "running_count", "active_count", "completed_at"] + __properties: ClassVar[List[str]] = [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "status", + "scale", + "running_count", + "active_count", + "completed_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +70,6 @@ class JobRuntimeSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,22 +108,24 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "scale", - "running_count", - "active_count", - "completed_at", - ]) + excluded_fields: Set[str] = set( + [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "scale", + "running_count", + "active_count", + "completed_at", + ] + ) _dict = self.model_dump( by_alias=True, @@ -119,31 +138,31 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict['conditions'] = _items + _dict["conditions"] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict['controller_uid'] = None + _dict["controller_uid"] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict['controller_kind'] = None + _dict["controller_kind"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None + _dict["deleted_at"] = None # set to None if completed_at (nullable) is None # and model_fields_set contains the field if self.completed_at is None and "completed_at" in self.model_fields_set: - _dict['completed_at'] = None + _dict["completed_at"] = None return _dict @@ -156,23 +175,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "scale": obj.get("scale"), - "running_count": obj.get("running_count"), - "active_count": obj.get("active_count"), - "completed_at": obj.get("completed_at") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": ( + [Condition.from_dict(_item) for _item in obj["conditions"]] + if obj.get("conditions") is not None + else None + ), + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "scale": obj.get("scale"), + "running_count": obj.get("running_count"), + "active_count": obj.get("active_count"), + "completed_at": obj.get("completed_at"), + } + ) return _obj - - diff --git a/saturn_api/models/job_runtime_summary_list.py b/saturn_api/models/job_runtime_summary_list.py index dbe6d39..d33d139 100644 --- a/saturn_api/models/job_runtime_summary_list.py +++ b/saturn_api/models/job_runtime_summary_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.job_runtime_summary import JobRuntimeSummary -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.job_runtime_summary import JobRuntimeSummary + + class JobRuntimeSummaryList(BaseModel): """ JobRuntimeSummaryList - """ # noqa: E501 + """ # noqa: E501 + job_summaries: List[JobRuntimeSummary] = Field(description="List of job runtime summaries.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class JobRuntimeSummaryList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "job_summaries", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "job_summaries", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_job_summaries in self.job_summaries: if _item_job_summaries: _items.append(_item_job_summaries.to_dict()) - _dict['job_summaries'] = _items + _dict["job_summaries"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "job_summaries": [JobRuntimeSummary.from_dict(_item) for _item in obj["job_summaries"]] if obj.get("job_summaries") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "job_summaries": ( + [JobRuntimeSummary.from_dict(_item) for _item in obj["job_summaries"]] + if obj.get("job_summaries") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/job_server_info.py b/saturn_api/models/job_server_info.py index fe00bf7..c1281dd 100644 --- a/saturn_api/models/job_server_info.py +++ b/saturn_api/models/job_server_info.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from saturn_api.models.default_images import DefaultImages from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.server_options_size import ServerOptionsSize -from typing import Literal, Optional, Set -from typing_extensions import Self + class JobServerInfo(BaseModel): """ JobServerInfo - """ # noqa: E501 + """ # noqa: E501 + server_options: ServerOptionsSize = Field(description="Configuration options for jobs.") default_images: DefaultImages = Field(description="Default images for jobs.") default_sizes: DefaultSizes = Field(description="Default instance sizes for jobs.") @@ -40,7 +42,6 @@ class JobServerInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,13 +75,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict['server_options'] = self.server_options.to_dict() + _dict["server_options"] = self.server_options.to_dict() # override the default output from pydantic by calling `to_dict()` of default_images if self.default_images: - _dict['default_images'] = self.default_images.to_dict() + _dict["default_images"] = self.default_images.to_dict() # override the default output from pydantic by calling `to_dict()` of default_sizes if self.default_sizes: - _dict['default_sizes'] = self.default_sizes.to_dict() + _dict["default_sizes"] = self.default_sizes.to_dict() return _dict @classmethod @@ -93,11 +93,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "server_options": ServerOptionsSize.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None, - "default_images": DefaultImages.from_dict(obj["default_images"]) if obj.get("default_images") is not None else None, - "default_sizes": DefaultSizes.from_dict(obj["default_sizes"]) if obj.get("default_sizes") is not None else None - }) + _obj = cls.model_validate( + { + "server_options": ( + ServerOptionsSize.from_dict(obj["server_options"]) + if obj.get("server_options") is not None + else None + ), + "default_images": ( + DefaultImages.from_dict(obj["default_images"]) + if obj.get("default_images") is not None + else None + ), + "default_sizes": ( + DefaultSizes.from_dict(obj["default_sizes"]) + if obj.get("default_sizes") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/job_spec.py b/saturn_api/models/job_spec.py index b5ec181..b935a44 100644 --- a/saturn_api/models/job_spec.py +++ b/saturn_api/models/job_spec.py @@ -1,39 +1,52 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment -from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe +from saturn_api.models.external_repo_attachment_recipe import ( + ExternalRepoAttachmentRecipe, +) from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe from saturn_api.models.image_tag_reference import ImageTagReference from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe -from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe -from typing import Literal, Optional, Set -from typing_extensions import Self +from saturn_api.models.shared_folder_attachment_recipe import ( + SharedFolderAttachmentRecipe, +) + class JobSpec(BaseModel): """ JobSpec - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr owner: Optional[OwnerReference] = None description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None @@ -43,6 +56,7 @@ class JobSpec(BaseModel): environment_variables: Optional[Dict[str, StrictStr]] = None working_directory: Optional[StrictStr] = None extra_packages: Optional[ExtraPackagesRecipe] = None + config_files: Optional[Dict[str, ConfigFileEntry]] = None start_script: Optional[StrictStr] = None token_scope: Optional[StrictStr] = None dask_cluster: Optional[DaskClusterAttachment] = None @@ -50,32 +64,57 @@ class JobSpec(BaseModel): secrets: Optional[List[SecretAttachmentRecipe]] = None shared_folders: Optional[List[SharedFolderAttachmentRecipe]] = None start_dind: Optional[StrictBool] = None - status: Literal['stopped', 'running'] | None = None + status: Literal["stopped", "running"] | None = None command: Annotated[str, Field(min_length=1, strict=True)] scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1 use_spot_instance: Optional[StrictBool] = False schedule: Optional[StrictStr] = None - concurrency_policy: Literal['Allow', 'Forbid', 'Replace'] | None = None + concurrency_policy: Literal["Allow", "Forbid", "Replace"] | None = None retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = None - __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "image", "instance_type", "environment_variables", "working_directory", "extra_packages", "start_script", "token_scope", "dask_cluster", "git_repositories", "secrets", "shared_folders", "start_dind", "status", "command", "scale", "use_spot_instance", "schedule", "concurrency_policy", "retries"] + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "tags", + "image", + "instance_type", + "environment_variables", + "working_directory", + "extra_packages", + "config_files", + "start_script", + "token_scope", + "dask_cluster", + "git_repositories", + "secrets", + "shared_folders", + "start_dind", + "status", + "command", + "scale", + "use_spot_instance", + "schedule", + "concurrency_policy", + "retries", + ] - @field_validator('status') + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['stopped', 'running']): + if value not in set(["stopped", "running"]): raise ValueError("must be one of enum values ('stopped', 'running')") return value - @field_validator('concurrency_policy') + @field_validator("concurrency_policy") def concurrency_policy_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Allow', 'Forbid', 'Replace']): + if value not in set(["Allow", "Forbid", "Replace"]): raise ValueError("must be one of enum values ('Allow', 'Forbid', 'Replace')") return value @@ -85,7 +124,6 @@ def concurrency_policy_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -110,8 +148,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -120,61 +157,73 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict['image'] = self.image.to_dict() + _dict["image"] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict['dask_cluster'] = self.dask_cluster.to_dict() + _dict["dask_cluster"] = self.dask_cluster.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in git_repositories (list) _items = [] if self.git_repositories: for _item_git_repositories in self.git_repositories: if _item_git_repositories: _items.append(_item_git_repositories.to_dict()) - _dict['git_repositories'] = _items + _dict["git_repositories"] = _items # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) _items = [] if self.secrets: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict['secrets'] = _items + _dict["secrets"] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_folders (list) _items = [] if self.shared_folders: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict['shared_folders'] = _items + _dict["shared_folders"] = _items # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if token_scope (nullable) is None # and model_fields_set contains the field if self.token_scope is None and "token_scope" in self.model_fields_set: - _dict['token_scope'] = None + _dict["token_scope"] = None # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None + _dict["status"] = None # set to None if schedule (nullable) is None # and model_fields_set contains the field if self.schedule is None and "schedule" in self.model_fields_set: - _dict['schedule'] = None + _dict["schedule"] = None return _dict @@ -187,31 +236,75 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "tags": obj.get("tags"), - "image": ImageTagReference.from_dict(obj["image"]) if obj.get("image") is not None else None, - "instance_type": obj.get("instance_type"), - "environment_variables": obj.get("environment_variables"), - "working_directory": obj.get("working_directory"), - "extra_packages": ExtraPackagesRecipe.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "token_scope": obj.get("token_scope"), - "dask_cluster": DaskClusterAttachment.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, - "git_repositories": [ExternalRepoAttachmentRecipe.from_dict(_item) for _item in obj["git_repositories"]] if obj.get("git_repositories") is not None else None, - "secrets": [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, - "shared_folders": [SharedFolderAttachmentRecipe.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, - "start_dind": obj.get("start_dind"), - "status": obj.get("status"), - "command": obj.get("command"), - "scale": obj.get("scale") if obj.get("scale") is not None else 1, - "use_spot_instance": obj.get("use_spot_instance") if obj.get("use_spot_instance") is not None else False, - "schedule": obj.get("schedule"), - "concurrency_policy": obj.get("concurrency_policy"), - "retries": obj.get("retries") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image": ( + ImageTagReference.from_dict(obj["image"]) + if obj.get("image") is not None + else None + ), + "instance_type": obj.get("instance_type"), + "environment_variables": obj.get("environment_variables"), + "working_directory": obj.get("working_directory"), + "extra_packages": ( + ExtraPackagesRecipe.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "token_scope": obj.get("token_scope"), + "dask_cluster": ( + DaskClusterAttachment.from_dict(obj["dask_cluster"]) + if obj.get("dask_cluster") is not None + else None + ), + "git_repositories": ( + [ + ExternalRepoAttachmentRecipe.from_dict(_item) + for _item in obj["git_repositories"] + ] + if obj.get("git_repositories") is not None + else None + ), + "secrets": ( + [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] + if obj.get("secrets") is not None + else None + ), + "shared_folders": ( + [ + SharedFolderAttachmentRecipe.from_dict(_item) + for _item in obj["shared_folders"] + ] + if obj.get("shared_folders") is not None + else None + ), + "start_dind": obj.get("start_dind"), + "status": obj.get("status"), + "command": obj.get("command"), + "scale": obj.get("scale") if obj.get("scale") is not None else 1, + "use_spot_instance": ( + obj.get("use_spot_instance") + if obj.get("use_spot_instance") is not None + else False + ), + "schedule": obj.get("schedule"), + "concurrency_policy": obj.get("concurrency_policy"), + "retries": obj.get("retries"), + } + ) return _obj - - diff --git a/saturn_api/models/job_start.py b/saturn_api/models/job_start.py index cab99cc..fe59d1d 100644 --- a/saturn_api/models/job_start.py +++ b/saturn_api/models/job_start.py @@ -1,32 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class JobStart(BaseModel): """ JobStart - """ # noqa: E501 - debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.") + """ # noqa: E501 + + debug_mode: Optional[StrictBool] = Field( + default=None, + description="Enable debug mode. Job will continue to run on error, and SSH will be enabled.", + ) __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -35,7 +39,6 @@ class JobStart(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "debug_mode": obj.get("debug_mode") - }) + _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) return _obj - - diff --git a/saturn_api/models/job_status.py b/saturn_api/models/job_status.py index 194387d..84283db 100644 --- a/saturn_api/models/job_status.py +++ b/saturn_api/models/job_status.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,16 +27,14 @@ class JobStatus(str, Enum): """ allowed enum values """ - PENDING = 'pending' - RUNNING = 'running' - STOPPING = 'stopping' - STOPPED = 'stopped' - COMPLETED = 'completed' - ERROR = 'error' + PENDING = "pending" + RUNNING = "running" + STOPPING = "stopping" + STOPPED = "stopped" + COMPLETED = "completed" + ERROR = "error" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of JobStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/job_update.py b/saturn_api/models/job_update.py index 3c464cd..f1909bc 100644 --- a/saturn_api/models/job_update.py +++ b/saturn_api/models/job_update.py @@ -1,54 +1,108 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry from saturn_api.models.cron_schedule_update import CronScheduleUpdate -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) from saturn_api.models.extra_packages import ExtraPackages -from typing import Literal, Optional, Set -from typing_extensions import Self + class JobUpdate(BaseModel): """ JobUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the job.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the job.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the job.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default=None, description="Description of the job." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the job." + ) image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") - environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments.") - extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") + image_enforce_trusted: Optional[StrictBool] = Field( + default=True, description="Enable image trust validation before attaching." + ) + environment_variables: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Mapping of environment variable keys to values." + ) + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( + default=None, description="List of external repo attachments." + ) + extra_packages: Optional[ExtraPackages] = Field( + default=None, description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, ConfigFileEntry]] = Field( + default=None, + description="User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode.", + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script that runs on start before the primary command." + ) working_dir: Optional[StrictStr] = Field(default=None, description="Initial working directory.") - instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the job.") - is_spot: Optional[StrictBool] = Field(default=None, description="Enables running on spot instance sizes.") + instance_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the job." + ) + is_spot: Optional[StrictBool] = Field( + default=None, description="Enables running on spot instance sizes." + ) start_dind: Optional[StrictBool] = Field(default=None, description="Enables docker-in-docker.") - command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Command that runs on start.") - scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Number of pod replicas.") - retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of retries for a failed job.") - cron_schedule_options: Optional[CronScheduleUpdate] = Field(default=None, description="Cron schedule configuration for scheduled jobs.") - __properties: ClassVar[List[str]] = ["name", "description", "tags", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "instance_size", "is_spot", "start_dind", "command", "scale", "retries", "cron_schedule_options"] + command: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( + default=None, description="Command that runs on start." + ) + scale: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( + default=None, description="Number of pod replicas." + ) + retries: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of retries for a failed job." + ) + cron_schedule_options: Optional[CronScheduleUpdate] = Field( + default=None, description="Cron schedule configuration for scheduled jobs." + ) + __properties: ClassVar[List[str]] = [ + "name", + "description", + "tags", + "image_uri", + "image_tag_id", + "image_enforce_trusted", + "environment_variables", + "external_repo_attachments", + "extra_packages", + "config_files", + "start_script", + "working_dir", + "instance_size", + "is_spot", + "start_dind", + "command", + "scale", + "retries", + "cron_schedule_options", + ] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +110,6 @@ class JobUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,8 +134,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -95,32 +147,44 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # override the default output from pydantic by calling `to_dict()` of cron_schedule_options if self.cron_schedule_options: - _dict['cron_schedule_options'] = self.cron_schedule_options.to_dict() + _dict["cron_schedule_options"] = self.cron_schedule_options.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if cron_schedule_options (nullable) is None # and model_fields_set contains the field if self.cron_schedule_options is None and "cron_schedule_options" in self.model_fields_set: - _dict['cron_schedule_options'] = None + _dict["cron_schedule_options"] = None return _dict @@ -133,26 +197,53 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir"), - "instance_size": obj.get("instance_size"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "command": obj.get("command"), - "scale": obj.get("scale"), - "retries": obj.get("retries"), - "cron_schedule_options": CronScheduleUpdate.from_dict(obj["cron_schedule_options"]) if obj.get("cron_schedule_options") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": ( + obj.get("image_enforce_trusted") + if obj.get("image_enforce_trusted") is not None + else True + ), + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": ( + [ + ExternalRepoAttachmentNested.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir"), + "instance_size": obj.get("instance_size"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "command": obj.get("command"), + "scale": obj.get("scale"), + "retries": obj.get("retries"), + "cron_schedule_options": ( + CronScheduleUpdate.from_dict(obj["cron_schedule_options"]) + if obj.get("cron_schedule_options") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/login.py b/saturn_api/models/login.py index 29c0af5..697aef3 100644 --- a/saturn_api/models/login.py +++ b/saturn_api/models/login.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class Login(BaseModel): """ Login - """ # noqa: E501 + """ # noqa: E501 + username: StrictStr = Field(description="The user's login username.") password: StrictStr = Field(description="The user's password.") __properties: ClassVar[List[str]] = ["username", "password"] @@ -36,7 +37,6 @@ class Login(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "username": obj.get("username"), - "password": obj.get("password") - }) + _obj = cls.model_validate( + {"username": obj.get("username"), "password": obj.get("password")} + ) return _obj - - diff --git a/saturn_api/models/metric_series.py b/saturn_api/models/metric_series.py index 3c7c5bf..2200fea 100644 --- a/saturn_api/models/metric_series.py +++ b/saturn_api/models/metric_series.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from saturn_api.models.data_point import DataPoint from saturn_api.models.stats import Stats -from typing import Literal, Optional, Set -from typing_extensions import Self + class MetricSeries(BaseModel): """ MetricSeries - """ # noqa: E501 + """ # noqa: E501 + pod_name: StrictStr = Field(description="Name of the pod.") labels: Dict[str, StrictStr] = Field(description="Labels associated with the pod.") stats: Stats = Field(description="Stats computed over the data range.") @@ -40,7 +42,6 @@ class MetricSeries(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,12 +70,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "pod_name", - "labels", - "stats", - "data", - ]) + excluded_fields: Set[str] = set( + [ + "pod_name", + "labels", + "stats", + "data", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,14 +86,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of stats if self.stats: - _dict['stats'] = self.stats.to_dict() + _dict["stats"] = self.stats.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in data (list) _items = [] if self.data: for _item_data in self.data: if _item_data: _items.append(_item_data.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -102,12 +105,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pod_name": obj.get("pod_name"), - "labels": obj.get("labels"), - "stats": Stats.from_dict(obj["stats"]) if obj.get("stats") is not None else None, - "data": [DataPoint.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "pod_name": obj.get("pod_name"), + "labels": obj.get("labels"), + "stats": Stats.from_dict(obj["stats"]) if obj.get("stats") is not None else None, + "data": ( + [DataPoint.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/metrics.py b/saturn_api/models/metrics.py index eb32d80..a7796cd 100644 --- a/saturn_api/models/metrics.py +++ b/saturn_api/models/metrics.py @@ -1,39 +1,60 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.metric_series import MetricSeries -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.metric_series import MetricSeries + + class Metrics(BaseModel): """ Metrics - """ # noqa: E501 - cpu: Optional[List[MetricSeries]] = Field(default=None, description="CPU usage metric. Values expressed in millicores.") - memory: Optional[List[MetricSeries]] = Field(default=None, description="Memory usage metric. Values expressed in bytes.") - network_in: Optional[List[MetricSeries]] = Field(default=None, description="Network inbound usage metric. Values expressed in bytes.") - network_out: Optional[List[MetricSeries]] = Field(default=None, description="Network outbound usage metric. Values expressed in bytes.") - gpu: Optional[List[MetricSeries]] = Field(default=None, description="GPU usage metric. Values expressed in millicores.") - gpu_memory: Optional[List[MetricSeries]] = Field(default=None, description="GPU memory usage metric. Values expressed in bytes.") - __properties: ClassVar[List[str]] = ["cpu", "memory", "network_in", "network_out", "gpu", "gpu_memory"] + """ # noqa: E501 + + cpu: Optional[List[MetricSeries]] = Field( + default=None, description="CPU usage metric. Values expressed in millicores." + ) + memory: Optional[List[MetricSeries]] = Field( + default=None, description="Memory usage metric. Values expressed in bytes." + ) + network_in: Optional[List[MetricSeries]] = Field( + default=None, description="Network inbound usage metric. Values expressed in bytes." + ) + network_out: Optional[List[MetricSeries]] = Field( + default=None, description="Network outbound usage metric. Values expressed in bytes." + ) + gpu: Optional[List[MetricSeries]] = Field( + default=None, description="GPU usage metric. Values expressed in millicores." + ) + gpu_memory: Optional[List[MetricSeries]] = Field( + default=None, description="GPU memory usage metric. Values expressed in bytes." + ) + __properties: ClassVar[List[str]] = [ + "cpu", + "memory", + "network_in", + "network_out", + "gpu", + "gpu_memory", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +62,6 @@ class Metrics(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,14 +92,16 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "cpu", - "memory", - "network_in", - "network_out", - "gpu", - "gpu_memory", - ]) + excluded_fields: Set[str] = set( + [ + "cpu", + "memory", + "network_in", + "network_out", + "gpu", + "gpu_memory", + ] + ) _dict = self.model_dump( by_alias=True, @@ -92,71 +114,71 @@ def to_dict(self) -> Dict[str, Any]: for _item_cpu in self.cpu: if _item_cpu: _items.append(_item_cpu.to_dict()) - _dict['cpu'] = _items + _dict["cpu"] = _items # override the default output from pydantic by calling `to_dict()` of each item in memory (list) _items = [] if self.memory: for _item_memory in self.memory: if _item_memory: _items.append(_item_memory.to_dict()) - _dict['memory'] = _items + _dict["memory"] = _items # override the default output from pydantic by calling `to_dict()` of each item in network_in (list) _items = [] if self.network_in: for _item_network_in in self.network_in: if _item_network_in: _items.append(_item_network_in.to_dict()) - _dict['network_in'] = _items + _dict["network_in"] = _items # override the default output from pydantic by calling `to_dict()` of each item in network_out (list) _items = [] if self.network_out: for _item_network_out in self.network_out: if _item_network_out: _items.append(_item_network_out.to_dict()) - _dict['network_out'] = _items + _dict["network_out"] = _items # override the default output from pydantic by calling `to_dict()` of each item in gpu (list) _items = [] if self.gpu: for _item_gpu in self.gpu: if _item_gpu: _items.append(_item_gpu.to_dict()) - _dict['gpu'] = _items + _dict["gpu"] = _items # override the default output from pydantic by calling `to_dict()` of each item in gpu_memory (list) _items = [] if self.gpu_memory: for _item_gpu_memory in self.gpu_memory: if _item_gpu_memory: _items.append(_item_gpu_memory.to_dict()) - _dict['gpu_memory'] = _items + _dict["gpu_memory"] = _items # set to None if cpu (nullable) is None # and model_fields_set contains the field if self.cpu is None and "cpu" in self.model_fields_set: - _dict['cpu'] = None + _dict["cpu"] = None # set to None if memory (nullable) is None # and model_fields_set contains the field if self.memory is None and "memory" in self.model_fields_set: - _dict['memory'] = None + _dict["memory"] = None # set to None if network_in (nullable) is None # and model_fields_set contains the field if self.network_in is None and "network_in" in self.model_fields_set: - _dict['network_in'] = None + _dict["network_in"] = None # set to None if network_out (nullable) is None # and model_fields_set contains the field if self.network_out is None and "network_out" in self.model_fields_set: - _dict['network_out'] = None + _dict["network_out"] = None # set to None if gpu (nullable) is None # and model_fields_set contains the field if self.gpu is None and "gpu" in self.model_fields_set: - _dict['gpu'] = None + _dict["gpu"] = None # set to None if gpu_memory (nullable) is None # and model_fields_set contains the field if self.gpu_memory is None and "gpu_memory" in self.model_fields_set: - _dict['gpu_memory'] = None + _dict["gpu_memory"] = None return _dict @@ -169,14 +191,38 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "cpu": [MetricSeries.from_dict(_item) for _item in obj["cpu"]] if obj.get("cpu") is not None else None, - "memory": [MetricSeries.from_dict(_item) for _item in obj["memory"]] if obj.get("memory") is not None else None, - "network_in": [MetricSeries.from_dict(_item) for _item in obj["network_in"]] if obj.get("network_in") is not None else None, - "network_out": [MetricSeries.from_dict(_item) for _item in obj["network_out"]] if obj.get("network_out") is not None else None, - "gpu": [MetricSeries.from_dict(_item) for _item in obj["gpu"]] if obj.get("gpu") is not None else None, - "gpu_memory": [MetricSeries.from_dict(_item) for _item in obj["gpu_memory"]] if obj.get("gpu_memory") is not None else None - }) + _obj = cls.model_validate( + { + "cpu": ( + [MetricSeries.from_dict(_item) for _item in obj["cpu"]] + if obj.get("cpu") is not None + else None + ), + "memory": ( + [MetricSeries.from_dict(_item) for _item in obj["memory"]] + if obj.get("memory") is not None + else None + ), + "network_in": ( + [MetricSeries.from_dict(_item) for _item in obj["network_in"]] + if obj.get("network_in") is not None + else None + ), + "network_out": ( + [MetricSeries.from_dict(_item) for _item in obj["network_out"]] + if obj.get("network_out") is not None + else None + ), + "gpu": ( + [MetricSeries.from_dict(_item) for _item in obj["gpu"]] + if obj.get("gpu") is not None + else None + ), + "gpu_memory": ( + [MetricSeries.from_dict(_item) for _item in obj["gpu_memory"]] + if obj.get("gpu_memory") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/notification.py b/saturn_api/models/notification.py index bd81303..5f57941 100644 --- a/saturn_api/models/notification.py +++ b/saturn_api/models/notification.py @@ -1,32 +1,33 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class Notification(BaseModel): """ Notification - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the notification.") user_id: StrictStr = Field(description="User ID that is notified.") created_at: datetime = Field(description="Creation timestamp.") @@ -34,7 +35,15 @@ class Notification(BaseModel): message: StrictStr = Field(description="Message content of the notification.") data: Dict[str, Any] = Field(description="Additional data associated with the notification.") acknowledged: StrictBool = Field(description="Acknowledged by user.") - __properties: ClassVar[List[str]] = ["id", "user_id", "created_at", "topic", "message", "data", "acknowledged"] + __properties: ClassVar[List[str]] = [ + "id", + "user_id", + "created_at", + "topic", + "message", + "data", + "acknowledged", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +51,6 @@ class Notification(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,15 +82,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "user_id", - "created_at", - "topic", - "message", - "data", - "acknowledged", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "user_id", + "created_at", + "topic", + "message", + "data", + "acknowledged", + ] + ) _dict = self.model_dump( by_alias=True, @@ -100,15 +110,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "created_at": obj.get("created_at"), - "topic": obj.get("topic"), - "message": obj.get("message"), - "data": obj.get("data"), - "acknowledged": obj.get("acknowledged") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "created_at": obj.get("created_at"), + "topic": obj.get("topic"), + "message": obj.get("message"), + "data": obj.get("data"), + "acknowledged": obj.get("acknowledged"), + } + ) return _obj - - diff --git a/saturn_api/models/notification_acknowledged.py b/saturn_api/models/notification_acknowledged.py index 61cf777..2ddaaba 100644 --- a/saturn_api/models/notification_acknowledged.py +++ b/saturn_api/models/notification_acknowledged.py @@ -1,34 +1,38 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class NotificationAcknowledged(BaseModel): """ NotificationAcknowledged - """ # noqa: E501 - notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="List of notification IDs to acknowledge.") - acknowledged: Optional[StrictBool] = Field(default=True, description="Mark notifications as acknowledged or unacknowledged.") + """ # noqa: E501 + + notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field( + description="List of notification IDs to acknowledge." + ) + acknowledged: Optional[StrictBool] = Field( + default=True, description="Mark notifications as acknowledged or unacknowledged." + ) __properties: ClassVar[List[str]] = ["notification_ids", "acknowledged"] model_config = ConfigDict( @@ -37,7 +41,6 @@ class NotificationAcknowledged(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "notification_ids": obj.get("notification_ids"), - "acknowledged": obj.get("acknowledged") if obj.get("acknowledged") is not None else True - }) + _obj = cls.model_validate( + { + "notification_ids": obj.get("notification_ids"), + "acknowledged": ( + obj.get("acknowledged") if obj.get("acknowledged") is not None else True + ), + } + ) return _obj - - diff --git a/saturn_api/models/notification_delete.py b/saturn_api/models/notification_delete.py index 6eb54e4..6484ea2 100644 --- a/saturn_api/models/notification_delete.py +++ b/saturn_api/models/notification_delete.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class NotificationDelete(BaseModel): """ NotificationDelete - """ # noqa: E501 - notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="List of notification IDs to delete.") + """ # noqa: E501 + + notification_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field( + description="List of notification IDs to delete." + ) __properties: ClassVar[List[str]] = ["notification_ids"] model_config = ConfigDict( @@ -36,7 +38,6 @@ class NotificationDelete(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "notification_ids": obj.get("notification_ids") - }) + _obj = cls.model_validate({"notification_ids": obj.get("notification_ids")}) return _obj - - diff --git a/saturn_api/models/notification_list.py b/saturn_api/models/notification_list.py index 005f5eb..e5acaac 100644 --- a/saturn_api/models/notification_list.py +++ b/saturn_api/models/notification_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.notification import Notification -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.notification import Notification + + class NotificationList(BaseModel): """ NotificationList - """ # noqa: E501 + """ # noqa: E501 + notifications: List[Notification] = Field(description="List of notifications.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class NotificationList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "notifications", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "notifications", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_notifications in self.notifications: if _item_notifications: _items.append(_item_notifications.to_dict()) - _dict['notifications'] = _items + _dict["notifications"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "notifications": [Notification.from_dict(_item) for _item in obj["notifications"]] if obj.get("notifications") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "notifications": ( + [Notification.from_dict(_item) for _item in obj["notifications"]] + if obj.get("notifications") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/notification_subscribe.py b/saturn_api/models/notification_subscribe.py index 2e7945b..5d88227 100644 --- a/saturn_api/models/notification_subscribe.py +++ b/saturn_api/models/notification_subscribe.py @@ -1,34 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class NotificationSubscribe(BaseModel): """ NotificationSubscribe - """ # noqa: E501 + """ # noqa: E501 + topic: StrictStr = Field(description="Topic of the subscription.") user_id: Optional[StrictStr] = Field(default=None, description="User ID to be subscribed.") - options: Optional[Dict[str, Any]] = Field(default=None, description="Options data for the topic.") + options: Optional[Dict[str, Any]] = Field( + default=None, description="Options data for the topic." + ) __properties: ClassVar[List[str]] = ["topic", "user_id", "options"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class NotificationSubscribe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "topic": obj.get("topic"), - "user_id": obj.get("user_id"), - "options": obj.get("options") - }) + _obj = cls.model_validate( + { + "topic": obj.get("topic"), + "user_id": obj.get("user_id"), + "options": obj.get("options"), + } + ) return _obj - - diff --git a/saturn_api/models/notification_subscription.py b/saturn_api/models/notification_subscription.py index 757b09a..9050607 100644 --- a/saturn_api/models/notification_subscription.py +++ b/saturn_api/models/notification_subscription.py @@ -1,35 +1,38 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class NotificationSubscription(BaseModel): """ NotificationSubscription - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the notification subscription.") user_id: StrictStr = Field(description="User ID to be notified.") topic: StrictStr = Field(description="Topic of the subscription.") - options: Optional[Dict[str, Any]] = Field(default=None, description="Options data for the topic.") + options: Optional[Dict[str, Any]] = Field( + default=None, description="Options data for the topic." + ) __properties: ClassVar[List[str]] = ["id", "user_id", "topic", "options"] model_config = ConfigDict( @@ -38,7 +41,6 @@ class NotificationSubscription(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +69,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "user_id", - "topic", - "options", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "user_id", + "topic", + "options", + ] + ) _dict = self.model_dump( by_alias=True, @@ -90,12 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "topic": obj.get("topic"), - "options": obj.get("options") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "topic": obj.get("topic"), + "options": obj.get("options"), + } + ) return _obj - - diff --git a/saturn_api/models/notification_subscription_list.py b/saturn_api/models/notification_subscription_list.py index e00ff75..8849662 100644 --- a/saturn_api/models/notification_subscription_list.py +++ b/saturn_api/models/notification_subscription_list.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.notification_subscription import NotificationSubscription -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.notification_subscription import NotificationSubscription + + class NotificationSubscriptionList(BaseModel): """ NotificationSubscriptionList - """ # noqa: E501 - subscriptions: List[NotificationSubscription] = Field(description="List of notification subscriptions.") + """ # noqa: E501 + + subscriptions: List[NotificationSubscription] = Field( + description="List of notification subscriptions." + ) prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["subscriptions", "prev_key", "next_key"] @@ -38,7 +42,6 @@ class NotificationSubscriptionList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,9 +67,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "subscriptions", - ]) + excluded_fields: Set[str] = set( + [ + "subscriptions", + ] + ) _dict = self.model_dump( by_alias=True, @@ -79,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_subscriptions in self.subscriptions: if _item_subscriptions: _items.append(_item_subscriptions.to_dict()) - _dict['subscriptions'] = _items + _dict["subscriptions"] = _items return _dict @classmethod @@ -91,11 +96,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subscriptions": [NotificationSubscription.from_dict(_item) for _item in obj["subscriptions"]] if obj.get("subscriptions") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "subscriptions": ( + [NotificationSubscription.from_dict(_item) for _item in obj["subscriptions"]] + if obj.get("subscriptions") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/notification_unsubscribe.py b/saturn_api/models/notification_unsubscribe.py index c4f1382..e94b2e0 100644 --- a/saturn_api/models/notification_unsubscribe.py +++ b/saturn_api/models/notification_unsubscribe.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class NotificationUnsubscribe(BaseModel): """ NotificationUnsubscribe - """ # noqa: E501 + """ # noqa: E501 + topic: StrictStr = Field(description="Topic of the subscription.") user_id: Optional[StrictStr] = Field(default=None, description="User ID to be unsubscribed.") __properties: ClassVar[List[str]] = ["topic", "user_id"] @@ -36,7 +37,6 @@ class NotificationUnsubscribe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "topic": obj.get("topic"), - "user_id": obj.get("user_id") - }) + _obj = cls.model_validate({"topic": obj.get("topic"), "user_id": obj.get("user_id")}) return _obj - - diff --git a/saturn_api/models/object_storage_bulk_delete_results.py b/saturn_api/models/object_storage_bulk_delete_results.py index 0a0becd..536102f 100644 --- a/saturn_api/models/object_storage_bulk_delete_results.py +++ b/saturn_api/models/object_storage_bulk_delete_results.py @@ -1,32 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageBulkDeleteResults(BaseModel): """ ObjectStorageBulkDeleteResults - """ # noqa: E501 - failed_file_paths: List[StrictStr] = Field(description="List of file paths that failed to delete.") + """ # noqa: E501 + + failed_file_paths: List[StrictStr] = Field( + description="List of file paths that failed to delete." + ) __properties: ClassVar[List[str]] = ["failed_file_paths"] model_config = ConfigDict( @@ -35,7 +38,6 @@ class ObjectStorageBulkDeleteResults(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "failed_file_paths", - ]) + excluded_fields: Set[str] = set( + [ + "failed_file_paths", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,9 +85,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "failed_file_paths": obj.get("failed_file_paths") - }) + _obj = cls.model_validate({"failed_file_paths": obj.get("failed_file_paths")}) return _obj - - diff --git a/saturn_api/models/object_storage_bulk_download.py b/saturn_api/models/object_storage_bulk_download.py index 582de79..2c7a23e 100644 --- a/saturn_api/models/object_storage_bulk_download.py +++ b/saturn_api/models/object_storage_bulk_download.py @@ -1,32 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.object_storage_presigned_download import ObjectStoragePresignedDownload -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.object_storage_presigned_download import ( + ObjectStoragePresignedDownload, +) + + class ObjectStorageBulkDownload(BaseModel): """ ObjectStorageBulkDownload - """ # noqa: E501 + """ # noqa: E501 + files: List[ObjectStoragePresignedDownload] = Field(description="List of presigned downloads.") __properties: ClassVar[List[str]] = ["files"] @@ -36,7 +40,6 @@ class ObjectStorageBulkDownload(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,9 +65,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "files", - ]) + excluded_fields: Set[str] = set( + [ + "files", + ] + ) _dict = self.model_dump( by_alias=True, @@ -77,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_files in self.files: if _item_files: _items.append(_item_files.to_dict()) - _dict['files'] = _items + _dict["files"] = _items return _dict @classmethod @@ -89,9 +94,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "files": [ObjectStoragePresignedDownload.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None - }) + _obj = cls.model_validate( + { + "files": ( + [ObjectStoragePresignedDownload.from_dict(_item) for _item in obj["files"]] + if obj.get("files") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_bulk_reference.py b/saturn_api/models/object_storage_bulk_reference.py index e135055..6e8bd76 100644 --- a/saturn_api/models/object_storage_bulk_reference.py +++ b/saturn_api/models/object_storage_bulk_reference.py @@ -1,34 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class ObjectStorageBulkReference(BaseModel): """ ObjectStorageBulkReference - """ # noqa: E501 - file_paths: Annotated[List[StrictStr], Field(min_length=1, max_length=1000)] = Field(description="List of file paths in object storage.") + """ # noqa: E501 + + file_paths: Annotated[List[StrictStr], Field(min_length=1, max_length=1000)] = Field( + description="List of file paths in object storage." + ) owner: Optional[OwnerReference] = Field(default=None, description="Owner of the files.") __properties: ClassVar[List[str]] = ["file_paths", "owner"] @@ -38,7 +41,6 @@ class ObjectStorageBulkReference(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -85,10 +86,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_paths": obj.get("file_paths"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - }) + _obj = cls.model_validate( + { + "file_paths": obj.get("file_paths"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_complete_part.py b/saturn_api/models/object_storage_complete_part.py index 58571e0..c527328 100644 --- a/saturn_api/models/object_storage_complete_part.py +++ b/saturn_api/models/object_storage_complete_part.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageCompletePart(BaseModel): """ ObjectStorageCompletePart - """ # noqa: E501 + """ # noqa: E501 + etag: StrictStr = Field(description="Etag of the completed part.") part_number: StrictInt = Field(description="Part number.") __properties: ClassVar[List[str]] = ["etag", "part_number"] @@ -36,7 +37,6 @@ class ObjectStorageCompletePart(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "etag": obj.get("etag"), - "part_number": obj.get("part_number") - }) + _obj = cls.model_validate({"etag": obj.get("etag"), "part_number": obj.get("part_number")}) return _obj - - diff --git a/saturn_api/models/object_storage_completed_upload.py b/saturn_api/models/object_storage_completed_upload.py index eb6bcd0..cdb48b0 100644 --- a/saturn_api/models/object_storage_completed_upload.py +++ b/saturn_api/models/object_storage_completed_upload.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.object_storage_complete_part import ObjectStorageCompletePart + + class ObjectStorageCompletedUpload(BaseModel): """ ObjectStorageCompletedUpload - """ # noqa: E501 + """ # noqa: E501 + parts: List[ObjectStorageCompletePart] = Field(description="List of completed upload parts.") __properties: ClassVar[List[str]] = ["parts"] @@ -36,7 +38,6 @@ class ObjectStorageCompletedUpload(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_parts in self.parts: if _item_parts: _items.append(_item_parts.to_dict()) - _dict['parts'] = _items + _dict["parts"] = _items return _dict @classmethod @@ -87,9 +87,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "parts": [ObjectStorageCompletePart.from_dict(_item) for _item in obj["parts"]] if obj.get("parts") is not None else None - }) + _obj = cls.model_validate( + { + "parts": ( + [ObjectStorageCompletePart.from_dict(_item) for _item in obj["parts"]] + if obj.get("parts") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_copy_source.py b/saturn_api/models/object_storage_copy_source.py index c2e8ebc..8ea077f 100644 --- a/saturn_api/models/object_storage_copy_source.py +++ b/saturn_api/models/object_storage_copy_source.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageCopySource(BaseModel): """ ObjectStorageCopySource - """ # noqa: E501 + """ # noqa: E501 + file_path: StrictStr = Field(description="File path of the source in object storage.") owner_name: StrictStr = Field(description="Name of the owner of the source.") __properties: ClassVar[List[str]] = ["file_path", "owner_name"] @@ -36,7 +37,6 @@ class ObjectStorageCopySource(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,10 +63,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "file_path", - "owner_name", - ]) + excluded_fields: Set[str] = set( + [ + "file_path", + "owner_name", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_path": obj.get("file_path"), - "owner_name": obj.get("owner_name") - }) + _obj = cls.model_validate( + {"file_path": obj.get("file_path"), "owner_name": obj.get("owner_name")} + ) return _obj - - diff --git a/saturn_api/models/object_storage_dir_details.py b/saturn_api/models/object_storage_dir_details.py index b468f40..7df9778 100644 --- a/saturn_api/models/object_storage_dir_details.py +++ b/saturn_api/models/object_storage_dir_details.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageDirDetails(BaseModel): """ ObjectStorageDirDetails - """ # noqa: E501 + """ # noqa: E501 + prefix: StrictStr = Field(description="Directory path.") __properties: ClassVar[List[str]] = ["prefix"] @@ -35,7 +36,6 @@ class ObjectStorageDirDetails(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,9 +61,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "prefix", - ]) + excluded_fields: Set[str] = set( + [ + "prefix", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,9 +83,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "prefix": obj.get("prefix") - }) + _obj = cls.model_validate({"prefix": obj.get("prefix")}) return _obj - - diff --git a/saturn_api/models/object_storage_file_details.py b/saturn_api/models/object_storage_file_details.py index dab62a4..c98a7e6 100644 --- a/saturn_api/models/object_storage_file_details.py +++ b/saturn_api/models/object_storage_file_details.py @@ -1,32 +1,33 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageFileDetails(BaseModel): """ ObjectStorageFileDetails - """ # noqa: E501 + """ # noqa: E501 + file_path: StrictStr = Field(description="File path in object storage.") size: StrictInt = Field(description="Size of the file.") created_at: datetime = Field(description="Creation timestamp.") @@ -39,7 +40,6 @@ class ObjectStorageFileDetails(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,12 +68,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "file_path", - "size", - "created_at", - "updated_at", - ]) + excluded_fields: Set[str] = set( + [ + "file_path", + "size", + "created_at", + "updated_at", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,12 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_path": obj.get("file_path"), - "size": obj.get("size"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at") - }) + _obj = cls.model_validate( + { + "file_path": obj.get("file_path"), + "size": obj.get("size"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_list.py b/saturn_api/models/object_storage_list.py index 3a23d2d..baf46d1 100644 --- a/saturn_api/models/object_storage_list.py +++ b/saturn_api/models/object_storage_list.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.object_storage_dir_details import ObjectStorageDirDetails from saturn_api.models.object_storage_file_details import ObjectStorageFileDetails -from typing import Literal, Optional, Set -from typing_extensions import Self + class ObjectStorageList(BaseModel): """ ObjectStorageList - """ # noqa: E501 + """ # noqa: E501 + dirs: List[ObjectStorageDirDetails] = Field(description="List of directories.") files: List[ObjectStorageFileDetails] = Field(description="List of files.") next_last_key: Optional[StrictStr] = Field(description="Next pagination key.") @@ -39,7 +41,6 @@ class ObjectStorageList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,11 +68,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "dirs", - "files", - "next_last_key", - ]) + excluded_fields: Set[str] = set( + [ + "dirs", + "files", + "next_last_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,18 +87,18 @@ def to_dict(self) -> Dict[str, Any]: for _item_dirs in self.dirs: if _item_dirs: _items.append(_item_dirs.to_dict()) - _dict['dirs'] = _items + _dict["dirs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in files (list) _items = [] if self.files: for _item_files in self.files: if _item_files: _items.append(_item_files.to_dict()) - _dict['files'] = _items + _dict["files"] = _items # set to None if next_last_key (nullable) is None # and model_fields_set contains the field if self.next_last_key is None and "next_last_key" in self.model_fields_set: - _dict['next_last_key'] = None + _dict["next_last_key"] = None return _dict @@ -108,11 +111,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "dirs": [ObjectStorageDirDetails.from_dict(_item) for _item in obj["dirs"]] if obj.get("dirs") is not None else None, - "files": [ObjectStorageFileDetails.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None, - "next_last_key": obj.get("next_last_key") - }) + _obj = cls.model_validate( + { + "dirs": ( + [ObjectStorageDirDetails.from_dict(_item) for _item in obj["dirs"]] + if obj.get("dirs") is not None + else None + ), + "files": ( + [ObjectStorageFileDetails.from_dict(_item) for _item in obj["files"]] + if obj.get("files") is not None + else None + ), + "next_last_key": obj.get("next_last_key"), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_presigned_download.py b/saturn_api/models/object_storage_presigned_download.py index 7f1b3c7..b82a54a 100644 --- a/saturn_api/models/object_storage_presigned_download.py +++ b/saturn_api/models/object_storage_presigned_download.py @@ -1,32 +1,33 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStoragePresignedDownload(BaseModel): """ ObjectStoragePresignedDownload - """ # noqa: E501 + """ # noqa: E501 + file_path: StrictStr = Field(description="File path in object storage.") size: StrictInt = Field(description="Size of the file.") updated_at: datetime = Field(description="File updated timestamp.") @@ -39,7 +40,6 @@ class ObjectStoragePresignedDownload(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,12 +68,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "file_path", - "size", - "updated_at", - "url", - ]) + excluded_fields: Set[str] = set( + [ + "file_path", + "size", + "updated_at", + "url", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,12 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_path": obj.get("file_path"), - "size": obj.get("size"), - "updated_at": obj.get("updated_at"), - "url": obj.get("url") - }) + _obj = cls.model_validate( + { + "file_path": obj.get("file_path"), + "size": obj.get("size"), + "updated_at": obj.get("updated_at"), + "url": obj.get("url"), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_presigned_part.py b/saturn_api/models/object_storage_presigned_part.py index 45cbb6b..c12c93a 100644 --- a/saturn_api/models/object_storage_presigned_part.py +++ b/saturn_api/models/object_storage_presigned_part.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStoragePresignedPart(BaseModel): """ ObjectStoragePresignedPart - """ # noqa: E501 + """ # noqa: E501 + url: StrictStr = Field(description="Presigned part upload URL.") part_number: StrictInt = Field(description="Part number.") size: StrictInt = Field(description="Size of the part.") @@ -38,7 +39,6 @@ class ObjectStoragePresignedPart(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "url", - "part_number", - "size", - "headers", - ]) + excluded_fields: Set[str] = set( + [ + "url", + "part_number", + "size", + "headers", + ] + ) _dict = self.model_dump( by_alias=True, @@ -90,12 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "url": obj.get("url"), - "part_number": obj.get("part_number"), - "size": obj.get("size"), - "headers": obj.get("headers") - }) + _obj = cls.model_validate( + { + "url": obj.get("url"), + "part_number": obj.get("part_number"), + "size": obj.get("size"), + "headers": obj.get("headers"), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_presigned_upload.py b/saturn_api/models/object_storage_presigned_upload.py index 24e7921..e0bb9a2 100644 --- a/saturn_api/models/object_storage_presigned_upload.py +++ b/saturn_api/models/object_storage_presigned_upload.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.object_storage_presigned_part import ObjectStoragePresignedPart + + class ObjectStoragePresignedUpload(BaseModel): """ ObjectStoragePresignedUpload - """ # noqa: E501 + """ # noqa: E501 + object_storage_upload_id: StrictStr = Field(description="ID of the object storage upload.") is_copy: StrictBool = Field(description="True if upload is a copy operation.") parts: List[ObjectStoragePresignedPart] = Field(description="List of presigned upload parts.") @@ -38,7 +40,6 @@ class ObjectStoragePresignedUpload(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "object_storage_upload_id", - "is_copy", - "parts", - ]) + excluded_fields: Set[str] = set( + [ + "object_storage_upload_id", + "is_copy", + "parts", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_parts in self.parts: if _item_parts: _items.append(_item_parts.to_dict()) - _dict['parts'] = _items + _dict["parts"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "object_storage_upload_id": obj.get("object_storage_upload_id"), - "is_copy": obj.get("is_copy"), - "parts": [ObjectStoragePresignedPart.from_dict(_item) for _item in obj["parts"]] if obj.get("parts") is not None else None - }) + _obj = cls.model_validate( + { + "object_storage_upload_id": obj.get("object_storage_upload_id"), + "is_copy": obj.get("is_copy"), + "parts": ( + [ObjectStoragePresignedPart.from_dict(_item) for _item in obj["parts"]] + if obj.get("parts") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_reference.py b/saturn_api/models/object_storage_reference.py index f69f9b4..303dafa 100644 --- a/saturn_api/models/object_storage_reference.py +++ b/saturn_api/models/object_storage_reference.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_reference import OwnerReference + + class ObjectStorageReference(BaseModel): """ ObjectStorageReference - """ # noqa: E501 + """ # noqa: E501 + file_path: StrictStr = Field(description="File path in object storage.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the file.") __properties: ClassVar[List[str]] = ["file_path", "owner"] @@ -37,7 +39,6 @@ class ObjectStorageReference(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -84,10 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_path": obj.get("file_path"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None - }) + _obj = cls.model_validate( + { + "file_path": obj.get("file_path"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_shared_owner.py b/saturn_api/models/object_storage_shared_owner.py index f127014..44008eb 100644 --- a/saturn_api/models/object_storage_shared_owner.py +++ b/saturn_api/models/object_storage_shared_owner.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageSharedOwner(BaseModel): """ ObjectStorageSharedOwner - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the owner.") name: StrictStr = Field(description="Name of the owner.") count: StrictInt = Field(description="Count of files shared by the owner.") @@ -37,7 +38,6 @@ class ObjectStorageSharedOwner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,11 +65,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "count", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "count", + ] + ) _dict = self.model_dump( by_alias=True, @@ -87,11 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "count": obj.get("count") - }) + _obj = cls.model_validate( + {"id": obj.get("id"), "name": obj.get("name"), "count": obj.get("count")} + ) return _obj - - diff --git a/saturn_api/models/object_storage_shared_owner_list.py b/saturn_api/models/object_storage_shared_owner_list.py index 05d6984..a683dad 100644 --- a/saturn_api/models/object_storage_shared_owner_list.py +++ b/saturn_api/models/object_storage_shared_owner_list.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.object_storage_shared_owner import ObjectStorageSharedOwner + + class ObjectStorageSharedOwnerList(BaseModel): """ ObjectStorageSharedOwnerList - """ # noqa: E501 - owners: List[ObjectStorageSharedOwner] = Field(description="List of owners with shared object storage.") + """ # noqa: E501 + + owners: List[ObjectStorageSharedOwner] = Field( + description="List of owners with shared object storage." + ) next_last_key: Optional[StrictStr] = Field(description="Next pagination key.") __properties: ClassVar[List[str]] = ["owners", "next_last_key"] @@ -37,7 +41,6 @@ class ObjectStorageSharedOwnerList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "owners", - "next_last_key", - ]) + excluded_fields: Set[str] = set( + [ + "owners", + "next_last_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -80,11 +85,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict['owners'] = _items + _dict["owners"] = _items # set to None if next_last_key (nullable) is None # and model_fields_set contains the field if self.next_last_key is None and "next_last_key" in self.model_fields_set: - _dict['next_last_key'] = None + _dict["next_last_key"] = None return _dict @@ -97,10 +102,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "owners": [ObjectStorageSharedOwner.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, - "next_last_key": obj.get("next_last_key") - }) + _obj = cls.model_validate( + { + "owners": ( + [ObjectStorageSharedOwner.from_dict(_item) for _item in obj["owners"]] + if obj.get("owners") is not None + else None + ), + "next_last_key": obj.get("next_last_key"), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_upload.py b/saturn_api/models/object_storage_upload.py index 71e4c36..26ef4c7 100644 --- a/saturn_api/models/object_storage_upload.py +++ b/saturn_api/models/object_storage_upload.py @@ -1,40 +1,51 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.object_storage_copy_source import ObjectStorageCopySource + + class ObjectStorageUpload(BaseModel): """ ObjectStorageUpload - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the object storage upload.") file_path: StrictStr = Field(description="File path of the upload in object storage.") size: Optional[StrictInt] = Field(description="Size of the file.") part_size: StrictInt = Field(description="Multipart upload size.") expires_at: datetime = Field(description="Expiration timestamp for the upload.") - copy_source: Optional[ObjectStorageCopySource] = Field(default=None, description="Object storage copy source.") - __properties: ClassVar[List[str]] = ["id", "file_path", "size", "part_size", "expires_at", "copy_source"] + copy_source: Optional[ObjectStorageCopySource] = Field( + default=None, description="Object storage copy source." + ) + __properties: ClassVar[List[str]] = [ + "id", + "file_path", + "size", + "part_size", + "expires_at", + "copy_source", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +53,6 @@ class ObjectStorageUpload(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,14 +83,16 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "file_path", - "size", - "part_size", - "expires_at", - "copy_source", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "file_path", + "size", + "part_size", + "expires_at", + "copy_source", + ] + ) _dict = self.model_dump( by_alias=True, @@ -89,16 +101,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of copy_source if self.copy_source: - _dict['copy_source'] = self.copy_source.to_dict() + _dict["copy_source"] = self.copy_source.to_dict() # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: - _dict['size'] = None + _dict["size"] = None # set to None if copy_source (nullable) is None # and model_fields_set contains the field if self.copy_source is None and "copy_source" in self.model_fields_set: - _dict['copy_source'] = None + _dict["copy_source"] = None return _dict @@ -111,14 +123,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "file_path": obj.get("file_path"), - "size": obj.get("size"), - "part_size": obj.get("part_size"), - "expires_at": obj.get("expires_at"), - "copy_source": ObjectStorageCopySource.from_dict(obj["copy_source"]) if obj.get("copy_source") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "file_path": obj.get("file_path"), + "size": obj.get("size"), + "part_size": obj.get("part_size"), + "expires_at": obj.get("expires_at"), + "copy_source": ( + ObjectStorageCopySource.from_dict(obj["copy_source"]) + if obj.get("copy_source") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_upload_create.py b/saturn_api/models/object_storage_upload_create.py index c5954ac..8d796f2 100644 --- a/saturn_api/models/object_storage_upload_create.py +++ b/saturn_api/models/object_storage_upload_create.py @@ -1,39 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.object_storage_reference import ObjectStorageReference from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class ObjectStorageUploadCreate(BaseModel): """ ObjectStorageUploadCreate - """ # noqa: E501 + """ # noqa: E501 + file_path: StrictStr = Field(description="File path in object storage.") - owner: Optional[OwnerReference] = Field(default=None, description="Owner of the file. Defaults to authenticated user/group.") - size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size of the file.") + owner: Optional[OwnerReference] = Field( + default=None, description="Owner of the file. Defaults to authenticated user/group." + ) + size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Size of the file." + ) part_size: Optional[StrictInt] = Field(default=None, description="Multipart upload size.") - copy_source: Optional[ObjectStorageReference] = Field(default=None, description="Object storage reference to copy.") + copy_source: Optional[ObjectStorageReference] = Field( + default=None, description="Object storage reference to copy." + ) __properties: ClassVar[List[str]] = ["file_path", "owner", "size", "part_size", "copy_source"] model_config = ConfigDict( @@ -42,7 +49,6 @@ class ObjectStorageUploadCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,19 +82,19 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of copy_source if self.copy_source: - _dict['copy_source'] = self.copy_source.to_dict() + _dict["copy_source"] = self.copy_source.to_dict() # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: - _dict['size'] = None + _dict["size"] = None # set to None if copy_source (nullable) is None # and model_fields_set contains the field if self.copy_source is None and "copy_source" in self.model_fields_set: - _dict['copy_source'] = None + _dict["copy_source"] = None return _dict @@ -102,13 +107,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_path": obj.get("file_path"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "size": obj.get("size"), - "part_size": obj.get("part_size"), - "copy_source": ObjectStorageReference.from_dict(obj["copy_source"]) if obj.get("copy_source") is not None else None - }) + _obj = cls.model_validate( + { + "file_path": obj.get("file_path"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "size": obj.get("size"), + "part_size": obj.get("part_size"), + "copy_source": ( + ObjectStorageReference.from_dict(obj["copy_source"]) + if obj.get("copy_source") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_upload_list.py b/saturn_api/models/object_storage_upload_list.py index 903b753..08de6df 100644 --- a/saturn_api/models/object_storage_upload_list.py +++ b/saturn_api/models/object_storage_upload_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.object_storage_upload import ObjectStorageUpload -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.object_storage_upload import ObjectStorageUpload + + class ObjectStorageUploadList(BaseModel): """ ObjectStorageUploadList - """ # noqa: E501 + """ # noqa: E501 + uploads: List[ObjectStorageUpload] = Field(description="List of object storage uploads.") __properties: ClassVar[List[str]] = ["uploads"] @@ -36,7 +38,6 @@ class ObjectStorageUploadList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "uploads", - ]) + excluded_fields: Set[str] = set( + [ + "uploads", + ] + ) _dict = self.model_dump( by_alias=True, @@ -77,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_uploads in self.uploads: if _item_uploads: _items.append(_item_uploads.to_dict()) - _dict['uploads'] = _items + _dict["uploads"] = _items return _dict @classmethod @@ -89,9 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "uploads": [ObjectStorageUpload.from_dict(_item) for _item in obj["uploads"]] if obj.get("uploads") is not None else None - }) + _obj = cls.model_validate( + { + "uploads": ( + [ObjectStorageUpload.from_dict(_item) for _item in obj["uploads"]] + if obj.get("uploads") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/object_storage_usage_stats.py b/saturn_api/models/object_storage_usage_stats.py index 111e841..0708423 100644 --- a/saturn_api/models/object_storage_usage_stats.py +++ b/saturn_api/models/object_storage_usage_stats.py @@ -1,39 +1,52 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ObjectStorageUsageStats(BaseModel): """ ObjectStorageUsageStats - """ # noqa: E501 + """ # noqa: E501 + used_bytes: StrictInt = Field(description="Total used bytes in object storage.") reserved_bytes: StrictInt = Field(description="Total reserved bytes for active uploads.") file_count: StrictInt = Field(description="Number of files in object storage.") active_uploads: StrictInt = Field(description="Number of active uploads in object storage.") - max_bytes: Optional[StrictInt] = Field(description="Maximum number of allowed object storage bytes.") - max_files: Optional[StrictInt] = Field(description="Maximum number of allowed object storage files.") + max_bytes: Optional[StrictInt] = Field( + description="Maximum number of allowed object storage bytes." + ) + max_files: Optional[StrictInt] = Field( + description="Maximum number of allowed object storage files." + ) max_uploads: StrictInt = Field(description="Maximum number of allowed concurrent uploads.") - __properties: ClassVar[List[str]] = ["used_bytes", "reserved_bytes", "file_count", "active_uploads", "max_bytes", "max_files", "max_uploads"] + __properties: ClassVar[List[str]] = [ + "used_bytes", + "reserved_bytes", + "file_count", + "active_uploads", + "max_bytes", + "max_files", + "max_uploads", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +54,6 @@ class ObjectStorageUsageStats(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,15 +85,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "used_bytes", - "reserved_bytes", - "file_count", - "active_uploads", - "max_bytes", - "max_files", - "max_uploads", - ]) + excluded_fields: Set[str] = set( + [ + "used_bytes", + "reserved_bytes", + "file_count", + "active_uploads", + "max_bytes", + "max_files", + "max_uploads", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,12 +105,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if max_bytes (nullable) is None # and model_fields_set contains the field if self.max_bytes is None and "max_bytes" in self.model_fields_set: - _dict['max_bytes'] = None + _dict["max_bytes"] = None # set to None if max_files (nullable) is None # and model_fields_set contains the field if self.max_files is None and "max_files" in self.model_fields_set: - _dict['max_files'] = None + _dict["max_files"] = None return _dict @@ -109,15 +123,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "used_bytes": obj.get("used_bytes"), - "reserved_bytes": obj.get("reserved_bytes"), - "file_count": obj.get("file_count"), - "active_uploads": obj.get("active_uploads"), - "max_bytes": obj.get("max_bytes"), - "max_files": obj.get("max_files"), - "max_uploads": obj.get("max_uploads") - }) + _obj = cls.model_validate( + { + "used_bytes": obj.get("used_bytes"), + "reserved_bytes": obj.get("reserved_bytes"), + "file_count": obj.get("file_count"), + "active_uploads": obj.get("active_uploads"), + "max_bytes": obj.get("max_bytes"), + "max_files": obj.get("max_files"), + "max_uploads": obj.get("max_uploads"), + } + ) return _obj - - diff --git a/saturn_api/models/org.py b/saturn_api/models/org.py index 6004f27..fc0e5a1 100644 --- a/saturn_api/models/org.py +++ b/saturn_api/models/org.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.usage_limits import UsageLimits -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.usage_limits import UsageLimits + + class Org(BaseModel): """ Org - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the org.") created_at: StrictStr = Field(description="Creation timestamp.") avatar_url: StrictStr = Field(description="Avatar URL for the org.") @@ -36,11 +38,27 @@ class Org(BaseModel): website_url: Optional[StrictStr] = Field(description="Website URL of the org.") logo_image_url: StrictStr = Field(description="Logo of the org.") limits_id: Optional[StrictStr] = Field(description="Usage limits ID applied to the entire org.") - limits: Optional[UsageLimits] = Field(default=None, description="Usage limits applied to the entire org, if set.") + limits: Optional[UsageLimits] = Field( + default=None, description="Usage limits applied to the entire org, if set." + ) is_primary: StrictBool = Field(description="Primary org for the account.") locked: StrictBool = Field(description="Locked orgs have restricted access to the API.") locked_reason: StrictStr = Field(description="Reason for the org being locked.") - __properties: ClassVar[List[str]] = ["id", "created_at", "avatar_url", "name", "email", "description", "website_url", "logo_image_url", "limits_id", "limits", "is_primary", "locked", "locked_reason"] + __properties: ClassVar[List[str]] = [ + "id", + "created_at", + "avatar_url", + "name", + "email", + "description", + "website_url", + "logo_image_url", + "limits_id", + "limits", + "is_primary", + "locked", + "locked_reason", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +66,6 @@ class Org(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,21 +103,23 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "avatar_url", - "name", - "email", - "description", - "website_url", - "logo_image_url", - "limits_id", - "limits", - "is_primary", - "locked", - "locked_reason", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "avatar_url", + "name", + "email", + "description", + "website_url", + "logo_image_url", + "limits_id", + "limits", + "is_primary", + "locked", + "locked_reason", + ] + ) _dict = self.model_dump( by_alias=True, @@ -109,21 +128,21 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of limits if self.limits: - _dict['limits'] = self.limits.to_dict() + _dict["limits"] = self.limits.to_dict() # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict['website_url'] = None + _dict["website_url"] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None # set to None if limits (nullable) is None # and model_fields_set contains the field if self.limits is None and "limits" in self.model_fields_set: - _dict['limits'] = None + _dict["limits"] = None return _dict @@ -136,21 +155,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "avatar_url": obj.get("avatar_url"), - "name": obj.get("name"), - "email": obj.get("email"), - "description": obj.get("description"), - "website_url": obj.get("website_url"), - "logo_image_url": obj.get("logo_image_url"), - "limits_id": obj.get("limits_id"), - "limits": UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None, - "is_primary": obj.get("is_primary"), - "locked": obj.get("locked"), - "locked_reason": obj.get("locked_reason") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "avatar_url": obj.get("avatar_url"), + "name": obj.get("name"), + "email": obj.get("email"), + "description": obj.get("description"), + "website_url": obj.get("website_url"), + "logo_image_url": obj.get("logo_image_url"), + "limits_id": obj.get("limits_id"), + "limits": ( + UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None + ), + "is_primary": obj.get("is_primary"), + "locked": obj.get("locked"), + "locked_reason": obj.get("locked_reason"), + } + ) return _obj - - diff --git a/saturn_api/models/org_create.py b/saturn_api/models/org_create.py index 7007f99..a7bd505 100644 --- a/saturn_api/models/org_create.py +++ b/saturn_api/models/org_create.py @@ -1,38 +1,48 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class OrgCreate(BaseModel): """ OrgCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the org.") email: StrictStr = Field(description="Email of the org.") - description: Optional[StrictStr] = Field(default='', description="Description of the org.") + description: Optional[StrictStr] = Field(default="", description="Description of the org.") website_url: Optional[StrictStr] = Field(default=None, description="Website URL of the org.") logo_image_url: Optional[StrictStr] = Field(default=None, description="Logo of the org.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the entire org. (Admin only)") - __properties: ClassVar[List[str]] = ["name", "email", "description", "website_url", "logo_image_url", "limits_id"] + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to the entire org. (Admin only)" + ) + __properties: ClassVar[List[str]] = [ + "name", + "email", + "description", + "website_url", + "logo_image_url", + "limits_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +50,6 @@ class OrgCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,17 +84,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict['website_url'] = None + _dict["website_url"] = None # set to None if logo_image_url (nullable) is None # and model_fields_set contains the field if self.logo_image_url is None and "logo_image_url" in self.model_fields_set: - _dict['logo_image_url'] = None + _dict["logo_image_url"] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None return _dict @@ -99,14 +107,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "email": obj.get("email"), - "description": obj.get("description") if obj.get("description") is not None else '', - "website_url": obj.get("website_url"), - "logo_image_url": obj.get("logo_image_url"), - "limits_id": obj.get("limits_id") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "email": obj.get("email"), + "description": obj.get("description") if obj.get("description") is not None else "", + "website_url": obj.get("website_url"), + "logo_image_url": obj.get("logo_image_url"), + "limits_id": obj.get("limits_id"), + } + ) return _obj - - diff --git a/saturn_api/models/org_invitation.py b/saturn_api/models/org_invitation.py index 6afa63e..916591a 100644 --- a/saturn_api/models/org_invitation.py +++ b/saturn_api/models/org_invitation.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.invitation_status import InvitationStatus from saturn_api.models.user import User -from typing import Literal, Optional, Set -from typing_extensions import Self + class OrgInvitation(BaseModel): """ OrgInvitation - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the org invitation.") email: StrictStr = Field(description="Email that the org invitation is sent to.") invitee_name: Optional[StrictStr] = Field(description="Name of the person being invited.") @@ -38,7 +40,18 @@ class OrgInvitation(BaseModel): status: InvitationStatus expiration: Optional[StrictStr] = Field(description="Invitation expiration timestamp.") created_at: StrictStr = Field(description="Creation timestamp.") - __properties: ClassVar[List[str]] = ["id", "email", "invitee_name", "invitor", "invitor_name", "org_id", "org_name", "status", "expiration", "created_at"] + __properties: ClassVar[List[str]] = [ + "id", + "email", + "invitee_name", + "invitor", + "invitor_name", + "org_id", + "org_name", + "status", + "expiration", + "created_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +59,6 @@ class OrgInvitation(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,17 +92,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "email", - "invitee_name", - "invitor", - "invitor_name", - "org_id", - "org_name", - "expiration", - "created_at", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "email", + "invitee_name", + "invitor", + "invitor_name", + "org_id", + "org_name", + "expiration", + "created_at", + ] + ) _dict = self.model_dump( by_alias=True, @@ -99,26 +113,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitor if self.invitor: - _dict['invitor'] = self.invitor.to_dict() + _dict["invitor"] = self.invitor.to_dict() # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict['invitee_name'] = None + _dict["invitee_name"] = None # set to None if invitor (nullable) is None # and model_fields_set contains the field if self.invitor is None and "invitor" in self.model_fields_set: - _dict['invitor'] = None + _dict["invitor"] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict['invitor_name'] = None + _dict["invitor_name"] = None # set to None if expiration (nullable) is None # and model_fields_set contains the field if self.expiration is None and "expiration" in self.model_fields_set: - _dict['expiration'] = None + _dict["expiration"] = None return _dict @@ -131,18 +145,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor": User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None, - "invitor_name": obj.get("invitor_name"), - "org_id": obj.get("org_id"), - "org_name": obj.get("org_name"), - "status": obj.get("status"), - "expiration": obj.get("expiration"), - "created_at": obj.get("created_at") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor": ( + User.from_dict(obj["invitor"]) if obj.get("invitor") is not None else None + ), + "invitor_name": obj.get("invitor_name"), + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "status": obj.get("status"), + "expiration": obj.get("expiration"), + "created_at": obj.get("created_at"), + } + ) return _obj - - diff --git a/saturn_api/models/org_invitation_create.py b/saturn_api/models/org_invitation_create.py index dd4e02a..29d15e2 100644 --- a/saturn_api/models/org_invitation_create.py +++ b/saturn_api/models/org_invitation_create.py @@ -1,34 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class OrgInvitationCreate(BaseModel): """ OrgInvitationCreate - """ # noqa: E501 + """ # noqa: E501 + email: StrictStr = Field(description="Email that the org invitation is sent to.") invitee_name: Optional[StrictStr] = None - invitor_name: Optional[StrictStr] = Field(default=None, description="Name of the person sending the invite.") + invitor_name: Optional[StrictStr] = Field( + default=None, description="Name of the person sending the invite." + ) __properties: ClassVar[List[str]] = ["email", "invitee_name", "invitor_name"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class OrgInvitationCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,12 +74,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if invitee_name (nullable) is None # and model_fields_set contains the field if self.invitee_name is None and "invitee_name" in self.model_fields_set: - _dict['invitee_name'] = None + _dict["invitee_name"] = None # set to None if invitor_name (nullable) is None # and model_fields_set contains the field if self.invitor_name is None and "invitor_name" in self.model_fields_set: - _dict['invitor_name'] = None + _dict["invitor_name"] = None return _dict @@ -91,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email": obj.get("email"), - "invitee_name": obj.get("invitee_name"), - "invitor_name": obj.get("invitor_name") - }) + _obj = cls.model_validate( + { + "email": obj.get("email"), + "invitee_name": obj.get("invitee_name"), + "invitor_name": obj.get("invitor_name"), + } + ) return _obj - - diff --git a/saturn_api/models/org_invitation_list.py b/saturn_api/models/org_invitation_list.py index 3a9c51d..1cd3b4d 100644 --- a/saturn_api/models/org_invitation_list.py +++ b/saturn_api/models/org_invitation_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.org_invitation import OrgInvitation -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.org_invitation import OrgInvitation + + class OrgInvitationList(BaseModel): """ OrgInvitationList - """ # noqa: E501 + """ # noqa: E501 + invitations: List[OrgInvitation] = Field(description="List of org invitations.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class OrgInvitationList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "invitations", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "invitations", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_invitations in self.invitations: if _item_invitations: _items.append(_item_invitations.to_dict()) - _dict['invitations'] = _items + _dict["invitations"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "invitations": [OrgInvitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "invitations": ( + [OrgInvitation.from_dict(_item) for _item in obj["invitations"]] + if obj.get("invitations") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/org_invitation_update.py b/saturn_api/models/org_invitation_update.py index 452e977..d88aa1c 100644 --- a/saturn_api/models/org_invitation_update.py +++ b/saturn_api/models/org_invitation_update.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from saturn_api.models.invitation_status import InvitationStatus -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.invitation_status import InvitationStatus + + class OrgInvitationUpdate(BaseModel): """ OrgInvitationUpdate - """ # noqa: E501 + """ # noqa: E501 + status: InvitationStatus __properties: ClassVar[List[str]] = ["status"] @@ -36,7 +38,6 @@ class OrgInvitationUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "status": obj.get("status") - }) + _obj = cls.model_validate({"status": obj.get("status")}) return _obj - - diff --git a/saturn_api/models/org_list.py b/saturn_api/models/org_list.py index 0125ba8..12fbf3e 100644 --- a/saturn_api/models/org_list.py +++ b/saturn_api/models/org_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.org import Org -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.org import Org + + class OrgList(BaseModel): """ OrgList - """ # noqa: E501 + """ # noqa: E501 + orgs: List[Org] = Field(description="List of orgs.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class OrgList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "orgs", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "orgs", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_orgs in self.orgs: if _item_orgs: _items.append(_item_orgs.to_dict()) - _dict['orgs'] = _items + _dict["orgs"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "orgs": [Org.from_dict(_item) for _item in obj["orgs"]] if obj.get("orgs") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "orgs": ( + [Org.from_dict(_item) for _item in obj["orgs"]] + if obj.get("orgs") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/org_member_create.py b/saturn_api/models/org_member_create.py index ddb3d63..7090752 100644 --- a/saturn_api/models/org_member_create.py +++ b/saturn_api/models/org_member_create.py @@ -1,34 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class OrgMemberCreate(BaseModel): """ OrgMemberCreate - """ # noqa: E501 + """ # noqa: E501 + user_id: StrictStr = Field(description="User ID to add to the org.") - org_admin: Optional[StrictBool] = Field(default=False, description="Enable user to take privileged actions on the org.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to this org member.") + org_admin: Optional[StrictBool] = Field( + default=False, description="Enable user to take privileged actions on the org." + ) + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to this org member." + ) __properties: ClassVar[List[str]] = ["user_id", "org_admin", "limits_id"] model_config = ConfigDict( @@ -37,7 +42,6 @@ class OrgMemberCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None return _dict @@ -86,11 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "user_id": obj.get("user_id"), - "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False, - "limits_id": obj.get("limits_id") - }) + _obj = cls.model_validate( + { + "user_id": obj.get("user_id"), + "org_admin": obj.get("org_admin") if obj.get("org_admin") is not None else False, + "limits_id": obj.get("limits_id"), + } + ) return _obj - - diff --git a/saturn_api/models/org_member_update.py b/saturn_api/models/org_member_update.py index eee1658..611fde5 100644 --- a/saturn_api/models/org_member_update.py +++ b/saturn_api/models/org_member_update.py @@ -1,33 +1,38 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class OrgMemberUpdate(BaseModel): """ OrgMemberUpdate - """ # noqa: E501 - org_admin: Optional[StrictBool] = Field(default=None, description="Enable user to take privileged actions on the org.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to this org member. (Admin only)") + """ # noqa: E501 + + org_admin: Optional[StrictBool] = Field( + default=None, description="Enable user to take privileged actions on the org." + ) + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to this org member. (Admin only)" + ) __properties: ClassVar[List[str]] = ["org_admin", "limits_id"] model_config = ConfigDict( @@ -36,7 +41,6 @@ class OrgMemberUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None return _dict @@ -85,10 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "org_admin": obj.get("org_admin"), - "limits_id": obj.get("limits_id") - }) + _obj = cls.model_validate( + {"org_admin": obj.get("org_admin"), "limits_id": obj.get("limits_id")} + ) return _obj - - diff --git a/saturn_api/models/org_update.py b/saturn_api/models/org_update.py index 8b0918d..14c01b2 100644 --- a/saturn_api/models/org_update.py +++ b/saturn_api/models/org_update.py @@ -1,38 +1,48 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class OrgUpdate(BaseModel): """ OrgUpdate - """ # noqa: E501 + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="Email of the org.") description: Optional[StrictStr] = Field(default=None, description="Description of the org.") website_url: Optional[StrictStr] = Field(default=None, description="Website URL of the org.") logo_image_url: Optional[StrictStr] = Field(default=None, description="Logo of the org.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the entire org. (Admin only)") + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to the entire org. (Admin only)" + ) locked: Optional[StrictBool] = Field(default=None, description="Lock the org. (Admin only)") - __properties: ClassVar[List[str]] = ["email", "description", "website_url", "logo_image_url", "limits_id", "locked"] + __properties: ClassVar[List[str]] = [ + "email", + "description", + "website_url", + "logo_image_url", + "limits_id", + "locked", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +50,6 @@ class OrgUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,17 +84,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict['website_url'] = None + _dict["website_url"] = None # set to None if logo_image_url (nullable) is None # and model_fields_set contains the field if self.logo_image_url is None and "logo_image_url" in self.model_fields_set: - _dict['logo_image_url'] = None + _dict["logo_image_url"] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None return _dict @@ -99,14 +107,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email": obj.get("email"), - "description": obj.get("description"), - "website_url": obj.get("website_url"), - "logo_image_url": obj.get("logo_image_url"), - "limits_id": obj.get("limits_id"), - "locked": obj.get("locked") - }) + _obj = cls.model_validate( + { + "email": obj.get("email"), + "description": obj.get("description"), + "website_url": obj.get("website_url"), + "logo_image_url": obj.get("logo_image_url"), + "limits_id": obj.get("limits_id"), + "locked": obj.get("locked"), + } + ) return _obj - - diff --git a/saturn_api/models/orgs_list_owners200_response.py b/saturn_api/models/orgs_list_owners200_response.py index c9fa059..e29a76d 100644 --- a/saturn_api/models/orgs_list_owners200_response.py +++ b/saturn_api/models/orgs_list_owners200_response.py @@ -1,36 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.owner_detailed_list import OwnerDetailedList from saturn_api.models.owner_list import OwnerList -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar ORGSLISTOWNERS200RESPONSE_ONE_OF_SCHEMAS = ["OwnerDetailedList", "OwnerList"] T = TypeVar("T", OwnerDetailedList, OwnerList, default=Union[OwnerDetailedList, OwnerList]) + class OrgsListOwners200Response(RootModel[T]): """ OrgsListOwners200Response """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -67,5 +77,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/owner.py b/saturn_api/models/owner.py index df4efc6..64ba15a 100644 --- a/saturn_api/models/owner.py +++ b/saturn_api/models/owner.py @@ -1,44 +1,60 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity_type import IdentityType -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity_type import IdentityType + + class Owner(BaseModel): """ Owner - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the owner") name: StrictStr = Field(description="Name of the owner (format: '/')") identity_name: StrictStr = Field(description="Name of the owner's identity") org_name: StrictStr = Field(description="Name of the org the owner belongs to.") created_at: StrictStr = Field(description="Creation timestamp.") - org_admin: StrictBool = Field(description="Enable the owner to take privileged actions on its org.") + org_admin: StrictBool = Field( + description="Enable the owner to take privileged actions on its org." + ) org_id: StrictStr = Field(description="Org ID the owner belongs to.") user_id: Optional[StrictStr] = Field(default=None, description="User ID of the owner.") group_id: Optional[StrictStr] = Field(default=None, description="Group ID of the owner.") identity_type: IdentityType avatar_url: StrictStr = Field(description="Avatar URL of the owner's identity.") - __properties: ClassVar[List[str]] = ["id", "name", "identity_name", "org_name", "created_at", "org_admin", "org_id", "user_id", "group_id", "identity_type", "avatar_url"] + __properties: ClassVar[List[str]] = [ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "group_id", + "identity_type", + "avatar_url", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +62,6 @@ class Owner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,18 +96,20 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "group_id", - "avatar_url", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "group_id", + "avatar_url", + ] + ) _dict = self.model_dump( by_alias=True, @@ -102,12 +119,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict['user_id'] = None + _dict["user_id"] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict['group_id'] = None + _dict["group_id"] = None return _dict @@ -120,19 +137,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "identity_name": obj.get("identity_name"), - "org_name": obj.get("org_name"), - "created_at": obj.get("created_at"), - "org_admin": obj.get("org_admin"), - "org_id": obj.get("org_id"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "identity_type": obj.get("identity_type"), - "avatar_url": obj.get("avatar_url") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "identity_name": obj.get("identity_name"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "org_admin": obj.get("org_admin"), + "org_id": obj.get("org_id"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "identity_type": obj.get("identity_type"), + "avatar_url": obj.get("avatar_url"), + } + ) return _obj - - diff --git a/saturn_api/models/owner_by_id.py b/saturn_api/models/owner_by_id.py index c95af73..89411ac 100644 --- a/saturn_api/models/owner_by_id.py +++ b/saturn_api/models/owner_by_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class OwnerById(BaseModel): """ OwnerById - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="Reference owner by ID.") __properties: ClassVar[List[str]] = ["id"] @@ -35,7 +36,6 @@ class OwnerById(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id") - }) + _obj = cls.model_validate({"id": obj.get("id")}) return _obj - - diff --git a/saturn_api/models/owner_by_identity_id.py b/saturn_api/models/owner_by_identity_id.py index 495d20b..546cc0e 100644 --- a/saturn_api/models/owner_by_identity_id.py +++ b/saturn_api/models/owner_by_identity_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class OwnerByIdentityId(BaseModel): """ OwnerByIdentityId - """ # noqa: E501 + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="Reference owner by user ID.") group_id: Optional[StrictStr] = Field(default=None, description="Reference owner by group ID.") org_id: Optional[StrictStr] = Field(default=None, description="Reference owner by org ID.") @@ -37,7 +38,6 @@ class OwnerByIdentityId(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,17 +72,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict['user_id'] = None + _dict["user_id"] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict['group_id'] = None + _dict["group_id"] = None # set to None if org_id (nullable) is None # and model_fields_set contains the field if self.org_id is None and "org_id" in self.model_fields_set: - _dict['org_id'] = None + _dict["org_id"] = None return _dict @@ -96,11 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "org_id": obj.get("org_id") - }) + _obj = cls.model_validate( + { + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "org_id": obj.get("org_id"), + } + ) return _obj - - diff --git a/saturn_api/models/owner_by_name.py b/saturn_api/models/owner_by_name.py index b058f43..609122d 100644 --- a/saturn_api/models/owner_by_name.py +++ b/saturn_api/models/owner_by_name.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class OwnerByName(BaseModel): """ OwnerByName - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Reference owner by name.") __properties: ClassVar[List[str]] = ["name"] @@ -35,7 +36,6 @@ class OwnerByName(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name") - }) + _obj = cls.model_validate({"name": obj.get("name")}) return _obj - - diff --git a/saturn_api/models/owner_detailed.py b/saturn_api/models/owner_detailed.py index a178b1e..e3bcf56 100644 --- a/saturn_api/models/owner_detailed.py +++ b/saturn_api/models/owner_detailed.py @@ -1,53 +1,78 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.group import Group from saturn_api.models.identity_type import IdentityType from saturn_api.models.org import Org from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.user_detailed import UserDetailed -from typing import Literal, Optional, Set -from typing_extensions import Self + class OwnerDetailed(BaseModel): """ OwnerDetailed - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the owner") name: StrictStr = Field(description="Name of the owner (format: '/')") identity_name: StrictStr = Field(description="Name of the owner's identity") org_name: StrictStr = Field(description="Name of the org the owner belongs to.") created_at: StrictStr = Field(description="Creation timestamp.") - org_admin: StrictBool = Field(description="Enable the owner to take privileged actions on its org.") + org_admin: StrictBool = Field( + description="Enable the owner to take privileged actions on its org." + ) org_id: StrictStr = Field(description="Org ID the owner belongs to.") user_id: Optional[StrictStr] = Field(default=None, description="User ID of the owner.") group_id: Optional[StrictStr] = Field(default=None, description="Group ID of the owner.") identity_type: IdentityType avatar_url: StrictStr = Field(description="Avatar URL of the owner's identity.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the owner.") + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to the owner." + ) org: Org = Field(description="Org that the owner belongs to.") user: Optional[UserDetailed] = Field(default=None, description="User identity of the owner.") group: Optional[Group] = Field(default=None, description="Group identity of the owner.") - limits: Optional[UsageLimits] = Field(default=None, description="Usage limits applied to the owner.") - __properties: ClassVar[List[str]] = ["id", "name", "identity_name", "org_name", "created_at", "org_admin", "org_id", "user_id", "group_id", "identity_type", "avatar_url", "limits_id", "org", "user", "group", "limits"] + limits: Optional[UsageLimits] = Field( + default=None, description="Usage limits applied to the owner." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "group_id", + "identity_type", + "avatar_url", + "limits_id", + "org", + "user", + "group", + "limits", + ] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +80,6 @@ class OwnerDetailed(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -95,23 +119,25 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "group_id", - "avatar_url", - "limits_id", - "org", - "user", - "group", - "limits", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "group_id", + "avatar_url", + "limits_id", + "org", + "user", + "group", + "limits", + ] + ) _dict = self.model_dump( by_alias=True, @@ -120,45 +146,45 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of org if self.org: - _dict['org'] = self.org.to_dict() + _dict["org"] = self.org.to_dict() # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict['user'] = self.user.to_dict() + _dict["user"] = self.user.to_dict() # override the default output from pydantic by calling `to_dict()` of group if self.group: - _dict['group'] = self.group.to_dict() + _dict["group"] = self.group.to_dict() # override the default output from pydantic by calling `to_dict()` of limits if self.limits: - _dict['limits'] = self.limits.to_dict() + _dict["limits"] = self.limits.to_dict() # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict['user_id'] = None + _dict["user_id"] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict['group_id'] = None + _dict["group_id"] = None # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None # set to None if user (nullable) is None # and model_fields_set contains the field if self.user is None and "user" in self.model_fields_set: - _dict['user'] = None + _dict["user"] = None # set to None if group (nullable) is None # and model_fields_set contains the field if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None + _dict["group"] = None # set to None if limits (nullable) is None # and model_fields_set contains the field if self.limits is None and "limits" in self.model_fields_set: - _dict['limits'] = None + _dict["limits"] = None return _dict @@ -171,24 +197,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "identity_name": obj.get("identity_name"), - "org_name": obj.get("org_name"), - "created_at": obj.get("created_at"), - "org_admin": obj.get("org_admin"), - "org_id": obj.get("org_id"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id"), - "identity_type": obj.get("identity_type"), - "avatar_url": obj.get("avatar_url"), - "limits_id": obj.get("limits_id"), - "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, - "user": UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None, - "group": Group.from_dict(obj["group"]) if obj.get("group") is not None else None, - "limits": UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "identity_name": obj.get("identity_name"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "org_admin": obj.get("org_admin"), + "org_id": obj.get("org_id"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + "identity_type": obj.get("identity_type"), + "avatar_url": obj.get("avatar_url"), + "limits_id": obj.get("limits_id"), + "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, + "user": ( + UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None + ), + "group": Group.from_dict(obj["group"]) if obj.get("group") is not None else None, + "limits": ( + UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/owner_detailed_list.py b/saturn_api/models/owner_detailed_list.py index 23297ba..15d6c4c 100644 --- a/saturn_api/models/owner_detailed_list.py +++ b/saturn_api/models/owner_detailed_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_detailed import OwnerDetailed -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_detailed import OwnerDetailed + + class OwnerDetailedList(BaseModel): """ OwnerDetailedList - """ # noqa: E501 + """ # noqa: E501 + owners: List[OwnerDetailed] = Field(description="List of detailed owners.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class OwnerDetailedList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "owners", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "owners", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict['owners'] = _items + _dict["owners"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "owners": [OwnerDetailed.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "owners": ( + [OwnerDetailed.from_dict(_item) for _item in obj["owners"]] + if obj.get("owners") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/owner_list.py b/saturn_api/models/owner_list.py index 6e225f8..059173c 100644 --- a/saturn_api/models/owner_list.py +++ b/saturn_api/models/owner_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner import Owner -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner import Owner + + class OwnerList(BaseModel): """ OwnerList - """ # noqa: E501 + """ # noqa: E501 + owners: List[Owner] = Field(description="List of owners.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class OwnerList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "owners", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "owners", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict['owners'] = _items + _dict["owners"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "owners": [Owner.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "owners": ( + [Owner.from_dict(_item) for _item in obj["owners"]] + if obj.get("owners") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/owner_reference.py b/saturn_api/models/owner_reference.py index 057e044..f7dc483 100644 --- a/saturn_api/models/owner_reference.py +++ b/saturn_api/models/owner_reference.py @@ -1,38 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from typing_extensions import Annotated +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Annotated, Literal, Self, TypeVar + from saturn_api.models.owner_by_id import OwnerById from saturn_api.models.owner_by_identity_id import OwnerByIdentityId from saturn_api.models.owner_by_name import OwnerByName -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar OWNERREFERENCE_ONE_OF_SCHEMAS = ["OwnerById", "OwnerByIdentityId", "OwnerByName", "str"] -T = TypeVar("T", OwnerById, OwnerByIdentityId, OwnerByName, str, default=Union[OwnerById, OwnerByIdentityId, OwnerByName, str]) +T = TypeVar( + "T", + OwnerById, + OwnerByIdentityId, + OwnerByName, + str, + default=Union[OwnerById, OwnerByIdentityId, OwnerByName, str], +) + class OwnerReference(RootModel[T]): """ OwnerReference """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -69,5 +85,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/owner_usage.py b/saturn_api/models/owner_usage.py index e7f0904..035ce95 100644 --- a/saturn_api/models/owner_usage.py +++ b/saturn_api/models/owner_usage.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from saturn_api.models.usage_owner import UsageOwner -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.usage_owner import UsageOwner + + class OwnerUsage(BaseModel): """ OwnerUsage - """ # noqa: E501 + """ # noqa: E501 + hours: Union[StrictFloat, StrictInt] = Field(description="Compute hours used.") dollars: Union[StrictFloat, StrictInt] = Field(description="Dollars spent.") owner: Optional[UsageOwner] = Field(default=None, description="Usage record owner identity.") @@ -38,7 +40,6 @@ class OwnerUsage(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -85,11 +85,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hours": obj.get("hours"), - "dollars": obj.get("dollars"), - "owner": UsageOwner.from_dict(obj["owner"]) if obj.get("owner") is not None else None - }) + _obj = cls.model_validate( + { + "hours": obj.get("hours"), + "dollars": obj.get("dollars"), + "owner": ( + UsageOwner.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/owner_usage_list.py b/saturn_api/models/owner_usage_list.py index 6d445f1..2343a14 100644 --- a/saturn_api/models/owner_usage_list.py +++ b/saturn_api/models/owner_usage_list.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_usage import OwnerUsage -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_usage import OwnerUsage + + class OwnerUsageList(BaseModel): """ OwnerUsageList - """ # noqa: E501 - usage: Optional[List[OwnerUsage]] = Field(default=None, description="List of owner usage records") + """ # noqa: E501 + + usage: Optional[List[OwnerUsage]] = Field( + default=None, description="List of owner usage records" + ) __properties: ClassVar[List[str]] = ["usage"] model_config = ConfigDict( @@ -36,7 +40,6 @@ class OwnerUsageList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_usage in self.usage: if _item_usage: _items.append(_item_usage.to_dict()) - _dict['usage'] = _items + _dict["usage"] = _items return _dict @classmethod @@ -87,9 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "usage": [OwnerUsage.from_dict(_item) for _item in obj["usage"]] if obj.get("usage") is not None else None - }) + _obj = cls.model_validate( + { + "usage": ( + [OwnerUsage.from_dict(_item) for _item in obj["usage"]] + if obj.get("usage") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/owner_user_detailed.py b/saturn_api/models/owner_user_detailed.py index 1e6f938..cffde59 100644 --- a/saturn_api/models/owner_user_detailed.py +++ b/saturn_api/models/owner_user_detailed.py @@ -1,50 +1,73 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.identity_type import IdentityType from saturn_api.models.org import Org from saturn_api.models.usage_limits import UsageLimits from saturn_api.models.user_detailed import UserDetailed -from typing import Literal, Optional, Set -from typing_extensions import Self + class OwnerUserDetailed(BaseModel): """ OwnerUserDetailed - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the owner") name: StrictStr = Field(description="Name of the owner (format: '/')") identity_name: StrictStr = Field(description="Name of the owner's identity") org_name: StrictStr = Field(description="Name of the org the owner belongs to.") created_at: StrictStr = Field(description="Creation timestamp.") - org_admin: StrictBool = Field(description="Enable the owner to take privileged actions on its org.") + org_admin: StrictBool = Field( + description="Enable the owner to take privileged actions on its org." + ) org_id: StrictStr = Field(description="Org ID the owner belongs to.") user_id: StrictStr = Field(description="User ID of the owner.") identity_type: IdentityType avatar_url: StrictStr = Field(description="Avatar URL of the owner's identity.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the owner.") + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to the owner." + ) org: Org = Field(description="Org that the owner belongs to.") user: UserDetailed = Field(description="Usser identity of the owner.") - limits: Optional[UsageLimits] = Field(default=None, description="Usage limits applied to the owner.") - __properties: ClassVar[List[str]] = ["id", "name", "identity_name", "org_name", "created_at", "org_admin", "org_id", "user_id", "identity_type", "avatar_url", "limits_id", "org", "user", "limits"] + limits: Optional[UsageLimits] = Field( + default=None, description="Usage limits applied to the owner." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "identity_type", + "avatar_url", + "limits_id", + "org", + "user", + "limits", + ] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +75,6 @@ class OwnerUserDetailed(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -90,21 +112,23 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "identity_name", - "org_name", - "created_at", - "org_admin", - "org_id", - "user_id", - "avatar_url", - "limits_id", - "org", - "user", - "limits", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "identity_name", + "org_name", + "created_at", + "org_admin", + "org_id", + "user_id", + "avatar_url", + "limits_id", + "org", + "user", + "limits", + ] + ) _dict = self.model_dump( by_alias=True, @@ -113,22 +137,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of org if self.org: - _dict['org'] = self.org.to_dict() + _dict["org"] = self.org.to_dict() # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict['user'] = self.user.to_dict() + _dict["user"] = self.user.to_dict() # override the default output from pydantic by calling `to_dict()` of limits if self.limits: - _dict['limits'] = self.limits.to_dict() + _dict["limits"] = self.limits.to_dict() # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None # set to None if limits (nullable) is None # and model_fields_set contains the field if self.limits is None and "limits" in self.model_fields_set: - _dict['limits'] = None + _dict["limits"] = None return _dict @@ -141,22 +165,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "identity_name": obj.get("identity_name"), - "org_name": obj.get("org_name"), - "created_at": obj.get("created_at"), - "org_admin": obj.get("org_admin"), - "org_id": obj.get("org_id"), - "user_id": obj.get("user_id"), - "identity_type": obj.get("identity_type"), - "avatar_url": obj.get("avatar_url"), - "limits_id": obj.get("limits_id"), - "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, - "user": UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None, - "limits": UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "identity_name": obj.get("identity_name"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "org_admin": obj.get("org_admin"), + "org_id": obj.get("org_id"), + "user_id": obj.get("user_id"), + "identity_type": obj.get("identity_type"), + "avatar_url": obj.get("avatar_url"), + "limits_id": obj.get("limits_id"), + "org": Org.from_dict(obj["org"]) if obj.get("org") is not None else None, + "user": ( + UserDetailed.from_dict(obj["user"]) if obj.get("user") is not None else None + ), + "limits": ( + UsageLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/pod_history.py b/saturn_api/models/pod_history.py index 6b4c1d2..4761241 100644 --- a/saturn_api/models/pod_history.py +++ b/saturn_api/models/pod_history.py @@ -1,37 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class PodHistory(BaseModel): """ PodHistory - """ # noqa: E501 + """ # noqa: E501 + pod_name: StrictStr = Field(description="Name of the pod.") status: StrictStr = Field(description="Last known status of the pod.") last_seen: StrictStr = Field(description="Last seen timestamp of the pod.") start_time: Optional[StrictStr] = Field(description="Start time of the pod.") - label_job_name: Optional[StrictStr] = Field(default=None, description="Job label, if applicable.") - __properties: ClassVar[List[str]] = ["pod_name", "status", "last_seen", "start_time", "label_job_name"] + label_job_name: Optional[StrictStr] = Field( + default=None, description="Job label, if applicable." + ) + __properties: ClassVar[List[str]] = [ + "pod_name", + "status", + "last_seen", + "start_time", + "label_job_name", + ] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +48,6 @@ class PodHistory(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,13 +77,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "pod_name", - "status", - "last_seen", - "start_time", - "label_job_name", - ]) + excluded_fields: Set[str] = set( + [ + "pod_name", + "status", + "last_seen", + "start_time", + "label_job_name", + ] + ) _dict = self.model_dump( by_alias=True, @@ -85,12 +95,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if start_time (nullable) is None # and model_fields_set contains the field if self.start_time is None and "start_time" in self.model_fields_set: - _dict['start_time'] = None + _dict["start_time"] = None # set to None if label_job_name (nullable) is None # and model_fields_set contains the field if self.label_job_name is None and "label_job_name" in self.model_fields_set: - _dict['label_job_name'] = None + _dict["label_job_name"] = None return _dict @@ -103,13 +113,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pod_name": obj.get("pod_name"), - "status": obj.get("status"), - "last_seen": obj.get("last_seen"), - "start_time": obj.get("start_time"), - "label_job_name": obj.get("label_job_name") - }) + _obj = cls.model_validate( + { + "pod_name": obj.get("pod_name"), + "status": obj.get("status"), + "last_seen": obj.get("last_seen"), + "start_time": obj.get("start_time"), + "label_job_name": obj.get("label_job_name"), + } + ) return _obj - - diff --git a/saturn_api/models/pod_logs.py b/saturn_api/models/pod_logs.py index 7609b1a..0196238 100644 --- a/saturn_api/models/pod_logs.py +++ b/saturn_api/models/pod_logs.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class PodLogs(BaseModel): """ PodLogs - """ # noqa: E501 + """ # noqa: E501 + logs: StrictStr = Field(description="Log lines from the active pod.") __properties: ClassVar[List[str]] = ["logs"] @@ -35,7 +36,6 @@ class PodLogs(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,9 +61,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "logs", - ]) + excluded_fields: Set[str] = set( + [ + "logs", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,9 +83,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "logs": obj.get("logs") - }) + _obj = cls.model_validate({"logs": obj.get("logs")}) return _obj - - diff --git a/saturn_api/models/pod_runtime_summary.py b/saturn_api/models/pod_runtime_summary.py index 714ef2a..f955f26 100644 --- a/saturn_api/models/pod_runtime_summary.py +++ b/saturn_api/models/pod_runtime_summary.py @@ -1,35 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.condition import Condition from saturn_api.models.container_runtime_summary import ContainerRuntimeSummary from saturn_api.models.pod_status import PodStatus -from typing import Literal, Optional, Set -from typing_extensions import Self + class PodRuntimeSummary(BaseModel): """ PodRuntimeSummary - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr namespace: StrictStr uid: StrictStr @@ -45,16 +47,33 @@ class PodRuntimeSummary(BaseModel): container_summaries: List[ContainerRuntimeSummary] node_name: Optional[StrictStr] completed_at: Optional[datetime] - reason: Literal['Evicted', 'OOMKilled'] | None - __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "init_container_summaries", "container_summaries", "node_name", "completed_at", "reason"] - - @field_validator('reason') + reason: Literal["Evicted", "OOMKilled"] | None + __properties: ClassVar[List[str]] = [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "status", + "init_container_summaries", + "container_summaries", + "node_name", + "completed_at", + "reason", + ] + + @field_validator("reason") def reason_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Evicted', 'OOMKilled']): + if value not in set(["Evicted", "OOMKilled"]): raise ValueError("must be one of enum values ('Evicted', 'OOMKilled')") return value @@ -64,7 +83,6 @@ def reason_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -104,23 +122,25 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "init_container_summaries", - "container_summaries", - "node_name", - "completed_at", - "reason", - ]) + excluded_fields: Set[str] = set( + [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "init_container_summaries", + "container_summaries", + "node_name", + "completed_at", + "reason", + ] + ) _dict = self.model_dump( by_alias=True, @@ -133,55 +153,55 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict['conditions'] = _items + _dict["conditions"] = _items # override the default output from pydantic by calling `to_dict()` of each item in init_container_summaries (list) _items = [] if self.init_container_summaries: for _item_init_container_summaries in self.init_container_summaries: if _item_init_container_summaries: _items.append(_item_init_container_summaries.to_dict()) - _dict['init_container_summaries'] = _items + _dict["init_container_summaries"] = _items # override the default output from pydantic by calling `to_dict()` of each item in container_summaries (list) _items = [] if self.container_summaries: for _item_container_summaries in self.container_summaries: if _item_container_summaries: _items.append(_item_container_summaries.to_dict()) - _dict['container_summaries'] = _items + _dict["container_summaries"] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict['controller_uid'] = None + _dict["controller_uid"] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict['controller_kind'] = None + _dict["controller_kind"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None + _dict["deleted_at"] = None # set to None if node_name (nullable) is None # and model_fields_set contains the field if self.node_name is None and "node_name" in self.model_fields_set: - _dict['node_name'] = None + _dict["node_name"] = None # set to None if completed_at (nullable) is None # and model_fields_set contains the field if self.completed_at is None and "completed_at" in self.model_fields_set: - _dict['completed_at'] = None + _dict["completed_at"] = None # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: - _dict['reason'] = None + _dict["reason"] = None return _dict @@ -194,24 +214,42 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "init_container_summaries": [ContainerRuntimeSummary.from_dict(_item) for _item in obj["init_container_summaries"]] if obj.get("init_container_summaries") is not None else None, - "container_summaries": [ContainerRuntimeSummary.from_dict(_item) for _item in obj["container_summaries"]] if obj.get("container_summaries") is not None else None, - "node_name": obj.get("node_name"), - "completed_at": obj.get("completed_at"), - "reason": obj.get("reason") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": ( + [Condition.from_dict(_item) for _item in obj["conditions"]] + if obj.get("conditions") is not None + else None + ), + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "init_container_summaries": ( + [ + ContainerRuntimeSummary.from_dict(_item) + for _item in obj["init_container_summaries"] + ] + if obj.get("init_container_summaries") is not None + else None + ), + "container_summaries": ( + [ + ContainerRuntimeSummary.from_dict(_item) + for _item in obj["container_summaries"] + ] + if obj.get("container_summaries") is not None + else None + ), + "node_name": obj.get("node_name"), + "completed_at": obj.get("completed_at"), + "reason": obj.get("reason"), + } + ) return _obj - - diff --git a/saturn_api/models/pod_runtime_summary_list.py b/saturn_api/models/pod_runtime_summary_list.py index 93ef84b..26e9eba 100644 --- a/saturn_api/models/pod_runtime_summary_list.py +++ b/saturn_api/models/pod_runtime_summary_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.pod_runtime_summary import PodRuntimeSummary -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.pod_runtime_summary import PodRuntimeSummary + + class PodRuntimeSummaryList(BaseModel): """ PodRuntimeSummaryList - """ # noqa: E501 + """ # noqa: E501 + pod_summaries: List[PodRuntimeSummary] = Field(description="List of pod summaries.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class PodRuntimeSummaryList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "pod_summaries", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "pod_summaries", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_pod_summaries in self.pod_summaries: if _item_pod_summaries: _items.append(_item_pod_summaries.to_dict()) - _dict['pod_summaries'] = _items + _dict["pod_summaries"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pod_summaries": [PodRuntimeSummary.from_dict(_item) for _item in obj["pod_summaries"]] if obj.get("pod_summaries") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "pod_summaries": ( + [PodRuntimeSummary.from_dict(_item) for _item in obj["pod_summaries"]] + if obj.get("pod_summaries") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/pod_status.py b/saturn_api/models/pod_status.py index bb902d7..6fa12f4 100644 --- a/saturn_api/models/pod_status.py +++ b/saturn_api/models/pod_status.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,17 +27,15 @@ class PodStatus(str, Enum): """ allowed enum values """ - PENDING = 'pending' - RUNNING = 'running' - ERROR = 'error' - STOPPING = 'stopping' - STOPPED = 'stopped' - COMPLETED = 'completed' - UNKNOWN = 'unknown' + PENDING = "pending" + RUNNING = "running" + ERROR = "error" + STOPPING = "stopping" + STOPPED = "stopped" + COMPLETED = "completed" + UNKNOWN = "unknown" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PodStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/recipe.py b/saturn_api/models/recipe.py index 67e7d6d..dfd521a 100644 --- a/saturn_api/models/recipe.py +++ b/saturn_api/models/recipe.py @@ -1,38 +1,55 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.deployment_recipe import DeploymentRecipe from saturn_api.models.image_recipe import ImageRecipe from saturn_api.models.job_recipe import JobRecipe from saturn_api.models.workspace_recipe import WorkspaceRecipe -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar RECIPE_ONE_OF_SCHEMAS = ["DeploymentRecipe", "ImageRecipe", "JobRecipe", "WorkspaceRecipe"] -T = TypeVar("T", DeploymentRecipe, ImageRecipe, JobRecipe, WorkspaceRecipe, default=Union[DeploymentRecipe, ImageRecipe, JobRecipe, WorkspaceRecipe]) +T = TypeVar( + "T", + DeploymentRecipe, + ImageRecipe, + JobRecipe, + WorkspaceRecipe, + default=Union[DeploymentRecipe, ImageRecipe, JobRecipe, WorkspaceRecipe], +) + class Recipe(RootModel[T]): """ Recipe """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -69,5 +86,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/recipe_list.py b/saturn_api/models/recipe_list.py index ab7272f..78828f4 100644 --- a/saturn_api/models/recipe_list.py +++ b/saturn_api/models/recipe_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.recipe import Recipe -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.recipe import Recipe + + class RecipeList(BaseModel): """ RecipeList - """ # noqa: E501 + """ # noqa: E501 + recipes: List[Recipe] prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class RecipeList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "recipes", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "recipes", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_recipes in self.recipes: if _item_recipes: _items.append(_item_recipes.to_dict()) - _dict['recipes'] = _items + _dict["recipes"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "recipes": [Recipe.from_dict(_item) for _item in obj["recipes"]] if obj.get("recipes") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "recipes": ( + [Recipe.from_dict(_item) for _item in obj["recipes"]] + if obj.get("recipes") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/resource.py b/saturn_api/models/resource.py index 2c8ac15..cc97e0e 100644 --- a/saturn_api/models/resource.py +++ b/saturn_api/models/resource.py @@ -1,38 +1,55 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.dask_cluster import DaskCluster from saturn_api.models.deployment import Deployment from saturn_api.models.job import Job from saturn_api.models.workspace import Workspace -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar RESOURCE_ONE_OF_SCHEMAS = ["DaskCluster", "Deployment", "Job", "Workspace"] -T = TypeVar("T", DaskCluster, Deployment, Job, Workspace, default=Union[DaskCluster, Deployment, Job, Workspace]) +T = TypeVar( + "T", + DaskCluster, + Deployment, + Job, + Workspace, + default=Union[DaskCluster, Deployment, Job, Workspace], +) + class Resource(RootModel[T]): """ Resource """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -69,5 +86,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/resource_by_deployment_id.py b/saturn_api/models/resource_by_deployment_id.py index 5c1ba8e..98d06bf 100644 --- a/saturn_api/models/resource_by_deployment_id.py +++ b/saturn_api/models/resource_by_deployment_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ResourceByDeploymentId(BaseModel): """ ResourceByDeploymentId - """ # noqa: E501 + """ # noqa: E501 + deployment_id: StrictStr = Field(description="Reference by deployment ID.") __properties: ClassVar[List[str]] = ["deployment_id"] @@ -35,7 +36,6 @@ class ResourceByDeploymentId(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "deployment_id": obj.get("deployment_id") - }) + _obj = cls.model_validate({"deployment_id": obj.get("deployment_id")}) return _obj - - diff --git a/saturn_api/models/resource_by_job_id.py b/saturn_api/models/resource_by_job_id.py index 79436d7..12cf87c 100644 --- a/saturn_api/models/resource_by_job_id.py +++ b/saturn_api/models/resource_by_job_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ResourceByJobId(BaseModel): """ ResourceByJobId - """ # noqa: E501 + """ # noqa: E501 + job_id: StrictStr = Field(description="Reference by job ID.") __properties: ClassVar[List[str]] = ["job_id"] @@ -35,7 +36,6 @@ class ResourceByJobId(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "job_id": obj.get("job_id") - }) + _obj = cls.model_validate({"job_id": obj.get("job_id")}) return _obj - - diff --git a/saturn_api/models/resource_by_workspace_id.py b/saturn_api/models/resource_by_workspace_id.py index 027be6b..4dbc3a8 100644 --- a/saturn_api/models/resource_by_workspace_id.py +++ b/saturn_api/models/resource_by_workspace_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ResourceByWorkspaceId(BaseModel): """ ResourceByWorkspaceId - """ # noqa: E501 + """ # noqa: E501 + workspace_id: StrictStr = Field(description="Reference by workspace ID.") __properties: ClassVar[List[str]] = ["workspace_id"] @@ -35,7 +36,6 @@ class ResourceByWorkspaceId(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "workspace_id": obj.get("workspace_id") - }) + _obj = cls.model_validate({"workspace_id": obj.get("workspace_id")}) return _obj - - diff --git a/saturn_api/models/resource_clusters.py b/saturn_api/models/resource_clusters.py index a7369ad..795a556 100644 --- a/saturn_api/models/resource_clusters.py +++ b/saturn_api/models/resource_clusters.py @@ -1,32 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ResourceClusters(BaseModel): """ ResourceClusters - """ # noqa: E501 - clusters: List[Optional[StrictStr]] = Field(description="List of clusters the resource has run on.") + """ # noqa: E501 + + clusters: List[Optional[StrictStr]] = Field( + description="List of clusters the resource has run on." + ) __properties: ClassVar[List[str]] = ["clusters"] model_config = ConfigDict( @@ -35,7 +38,6 @@ class ResourceClusters(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "clusters", - ]) + excluded_fields: Set[str] = set( + [ + "clusters", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,9 +85,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "clusters": obj.get("clusters") - }) + _obj = cls.model_validate({"clusters": obj.get("clusters")}) return _obj - - diff --git a/saturn_api/models/resource_history.py b/saturn_api/models/resource_history.py index 13cacfa..aa579e8 100644 --- a/saturn_api/models/resource_history.py +++ b/saturn_api/models/resource_history.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.pod_history import PodHistory -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.pod_history import PodHistory + + class ResourceHistory(BaseModel): """ ResourceHistory - """ # noqa: E501 + """ # noqa: E501 + pods: List[PodHistory] = Field(description="List of pod history.") __properties: ClassVar[List[str]] = ["pods"] @@ -36,7 +38,6 @@ class ResourceHistory(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "pods", - ]) + excluded_fields: Set[str] = set( + [ + "pods", + ] + ) _dict = self.model_dump( by_alias=True, @@ -77,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_pods in self.pods: if _item_pods: _items.append(_item_pods.to_dict()) - _dict['pods'] = _items + _dict["pods"] = _items return _dict @classmethod @@ -89,9 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pods": [PodHistory.from_dict(_item) for _item in obj["pods"]] if obj.get("pods") is not None else None - }) + _obj = cls.model_validate( + { + "pods": ( + [PodHistory.from_dict(_item) for _item in obj["pods"]] + if obj.get("pods") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/resource_recipe.py b/saturn_api/models/resource_recipe.py index a63d168..d832a3d 100644 --- a/saturn_api/models/resource_recipe.py +++ b/saturn_api/models/resource_recipe.py @@ -1,37 +1,53 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.deployment_recipe import DeploymentRecipe from saturn_api.models.job_recipe import JobRecipe from saturn_api.models.workspace_recipe import WorkspaceRecipe -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar RESOURCERECIPE_ONE_OF_SCHEMAS = ["DeploymentRecipe", "JobRecipe", "WorkspaceRecipe"] -T = TypeVar("T", DeploymentRecipe, JobRecipe, WorkspaceRecipe, default=Union[DeploymentRecipe, JobRecipe, WorkspaceRecipe]) +T = TypeVar( + "T", + DeploymentRecipe, + JobRecipe, + WorkspaceRecipe, + default=Union[DeploymentRecipe, JobRecipe, WorkspaceRecipe], +) + class ResourceRecipe(RootModel[T]): """ ResourceRecipe """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -68,5 +84,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/resource_reference.py b/saturn_api/models/resource_reference.py index abf7740..9054a4e 100644 --- a/saturn_api/models/resource_reference.py +++ b/saturn_api/models/resource_reference.py @@ -1,37 +1,57 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.resource_by_deployment_id import ResourceByDeploymentId from saturn_api.models.resource_by_job_id import ResourceByJobId from saturn_api.models.resource_by_workspace_id import ResourceByWorkspaceId -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar -RESOURCEREFERENCE_ONE_OF_SCHEMAS = ["ResourceByDeploymentId", "ResourceByJobId", "ResourceByWorkspaceId"] +RESOURCEREFERENCE_ONE_OF_SCHEMAS = [ + "ResourceByDeploymentId", + "ResourceByJobId", + "ResourceByWorkspaceId", +] + +T = TypeVar( + "T", + ResourceByDeploymentId, + ResourceByJobId, + ResourceByWorkspaceId, + default=Union[ResourceByDeploymentId, ResourceByJobId, ResourceByWorkspaceId], +) -T = TypeVar("T", ResourceByDeploymentId, ResourceByJobId, ResourceByWorkspaceId, default=Union[ResourceByDeploymentId, ResourceByJobId, ResourceByWorkspaceId]) class ResourceReference(RootModel[T]): """ ResourceReference """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -68,5 +88,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/resource_state.py b/saturn_api/models/resource_state.py index f4b5c9f..2ab9d00 100644 --- a/saturn_api/models/resource_state.py +++ b/saturn_api/models/resource_state.py @@ -1,40 +1,58 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.route_state import RouteState -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.route_state import RouteState + + class ResourceState(BaseModel): """ ResourceState - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr action: Optional[StrictStr] = None status: StrictStr - url: Optional[StrictStr] = Field(default=None, description="External URL for the primary route, if applicable.") - ssh_url: Optional[StrictStr] = Field(default=None, description="External SSH URL for the resource when SSH is enabled.") - ssh_user: Optional[StrictStr] = Field(default=None, description="SSH username for the resource when SSH is enabled.") - routes: Optional[List[RouteState]] = Field(default=None, description="External URL for each route exposed by the resource.") - __properties: ClassVar[List[str]] = ["id", "action", "status", "url", "ssh_url", "ssh_user", "routes"] + url: Optional[StrictStr] = Field( + default=None, description="External URL for the primary route, if applicable." + ) + ssh_url: Optional[StrictStr] = Field( + default=None, description="External SSH URL for the resource when SSH is enabled." + ) + ssh_user: Optional[StrictStr] = Field( + default=None, description="SSH username for the resource when SSH is enabled." + ) + routes: Optional[List[RouteState]] = Field( + default=None, description="External URL for each route exposed by the resource." + ) + __properties: ClassVar[List[str]] = [ + "id", + "action", + "status", + "url", + "ssh_url", + "ssh_user", + "routes", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +60,6 @@ class ResourceState(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,15 +91,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "action", - "status", - "url", - "ssh_url", - "ssh_user", - "routes", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "action", + "status", + "url", + "ssh_url", + "ssh_user", + "routes", + ] + ) _dict = self.model_dump( by_alias=True, @@ -95,21 +114,21 @@ def to_dict(self) -> Dict[str, Any]: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict['routes'] = _items + _dict["routes"] = _items # set to None if url (nullable) is None # and model_fields_set contains the field if self.url is None and "url" in self.model_fields_set: - _dict['url'] = None + _dict["url"] = None # set to None if ssh_url (nullable) is None # and model_fields_set contains the field if self.ssh_url is None and "ssh_url" in self.model_fields_set: - _dict['ssh_url'] = None + _dict["ssh_url"] = None # set to None if ssh_user (nullable) is None # and model_fields_set contains the field if self.ssh_user is None and "ssh_user" in self.model_fields_set: - _dict['ssh_user'] = None + _dict["ssh_user"] = None return _dict @@ -122,15 +141,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "action": obj.get("action"), - "status": obj.get("status"), - "url": obj.get("url"), - "ssh_url": obj.get("ssh_url"), - "ssh_user": obj.get("ssh_user"), - "routes": [RouteState.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "action": obj.get("action"), + "status": obj.get("status"), + "url": obj.get("url"), + "ssh_url": obj.get("ssh_url"), + "ssh_user": obj.get("ssh_user"), + "routes": ( + [RouteState.from_dict(_item) for _item in obj["routes"]] + if obj.get("routes") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/resource_template.py b/saturn_api/models/resource_template.py index ab94ee1..9d51045 100644 --- a/saturn_api/models/resource_template.py +++ b/saturn_api/models/resource_template.py @@ -1,45 +1,66 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.owner import Owner from saturn_api.models.resource_template_access_level import ResourceTemplateAccessLevel -from typing import Literal, Optional, Set -from typing_extensions import Self + class ResourceTemplate(BaseModel): """ ResourceTemplate - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the resource template.") name: StrictStr = Field(description="Name of the resource template.") owner: Owner = Field(description="Owner of the resource template.") description: StrictStr = Field(description="Description of the resource template.") created_at: StrictStr = Field(description="Creation timestamp") - thumbnail_image_url: Optional[StrictStr] = Field(description="Thumbnail image URL to display with the resource template.") + thumbnail_image_url: Optional[StrictStr] = Field( + description="Thumbnail image URL to display with the resource template." + ) weight: Optional[StrictInt] = Field(description="Gallery ordering weight.") recipe: Dict[str, Any] = Field(description="Resource recipe to apply.") access: ResourceTemplateAccessLevel - in_gallery: Optional[StrictBool] = Field(default=None, description="Enable displaying the resource template in the dashboard gallery.") - editable: StrictBool = Field(description="True if the resource template is editable by the authenticated user/group.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "description", "created_at", "thumbnail_image_url", "weight", "recipe", "access", "in_gallery", "editable"] + in_gallery: Optional[StrictBool] = Field( + default=None, + description="Enable displaying the resource template in the dashboard gallery.", + ) + editable: StrictBool = Field( + description="True if the resource template is editable by the authenticated user/group." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "description", + "created_at", + "thumbnail_image_url", + "weight", + "recipe", + "access", + "in_gallery", + "editable", + ] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +68,6 @@ class ResourceTemplate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,17 +101,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "description", - "created_at", - "thumbnail_image_url", - "weight", - "recipe", - "editable", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "description", + "created_at", + "thumbnail_image_url", + "weight", + "recipe", + "editable", + ] + ) _dict = self.model_dump( by_alias=True, @@ -100,16 +122,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # set to None if thumbnail_image_url (nullable) is None # and model_fields_set contains the field if self.thumbnail_image_url is None and "thumbnail_image_url" in self.model_fields_set: - _dict['thumbnail_image_url'] = None + _dict["thumbnail_image_url"] = None # set to None if weight (nullable) is None # and model_fields_set contains the field if self.weight is None and "weight" in self.model_fields_set: - _dict['weight'] = None + _dict["weight"] = None return _dict @@ -122,19 +144,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "created_at": obj.get("created_at"), - "thumbnail_image_url": obj.get("thumbnail_image_url"), - "weight": obj.get("weight"), - "recipe": obj.get("recipe"), - "access": obj.get("access"), - "in_gallery": obj.get("in_gallery"), - "editable": obj.get("editable") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "created_at": obj.get("created_at"), + "thumbnail_image_url": obj.get("thumbnail_image_url"), + "weight": obj.get("weight"), + "recipe": obj.get("recipe"), + "access": obj.get("access"), + "in_gallery": obj.get("in_gallery"), + "editable": obj.get("editable"), + } + ) return _obj - - diff --git a/saturn_api/models/resource_template_access_level.py b/saturn_api/models/resource_template_access_level.py index 80c5d23..d18c6f1 100644 --- a/saturn_api/models/resource_template_access_level.py +++ b/saturn_api/models/resource_template_access_level.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class ResourceTemplateAccessLevel(str, Enum): """ allowed enum values """ - ACCOUNT = 'account' - ORG = 'org' - OWNER = 'owner' + ACCOUNT = "account" + ORG = "org" + OWNER = "owner" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ResourceTemplateAccessLevel from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/resource_token_info.py b/saturn_api/models/resource_token_info.py index c66c547..1f515b1 100644 --- a/saturn_api/models/resource_token_info.py +++ b/saturn_api/models/resource_token_info.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ResourceTokenInfo(BaseModel): """ ResourceTokenInfo - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the token.") scope: Optional[StrictStr] = Field(description="Permission scope of the token.") __properties: ClassVar[List[str]] = ["id", "scope"] @@ -36,7 +37,6 @@ class ResourceTokenInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict['scope'] = None + _dict["scope"] = None return _dict @@ -85,10 +84,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "scope": obj.get("scope") - }) + _obj = cls.model_validate({"id": obj.get("id"), "scope": obj.get("scope")}) return _obj - - diff --git a/saturn_api/models/resource_token_update.py b/saturn_api/models/resource_token_update.py index 53bd3f6..e9d4e35 100644 --- a/saturn_api/models/resource_token_update.py +++ b/saturn_api/models/resource_token_update.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ResourceTokenUpdate(BaseModel): """ ResourceTokenUpdate - """ # noqa: E501 + """ # noqa: E501 + scope: Optional[StrictStr] = Field(description="Permission scope of the token.") __properties: ClassVar[List[str]] = ["scope"] @@ -35,7 +36,6 @@ class ResourceTokenUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if scope (nullable) is None # and model_fields_set contains the field if self.scope is None and "scope" in self.model_fields_set: - _dict['scope'] = None + _dict["scope"] = None return _dict @@ -84,9 +83,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "scope": obj.get("scope") - }) + _obj = cls.model_validate({"scope": obj.get("scope")}) return _obj - - diff --git a/saturn_api/models/resource_type.py b/saturn_api/models/resource_type.py index 19ca0e6..72a233c 100644 --- a/saturn_api/models/resource_type.py +++ b/saturn_api/models/resource_type.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,14 +27,12 @@ class ResourceType(str, Enum): """ allowed enum values """ - DEPLOYMENT = 'deployment' - JOB = 'job' - WORKSPACE = 'workspace' - DASK = 'dask' + DEPLOYMENT = "deployment" + JOB = "job" + WORKSPACE = "workspace" + DASK = "dask" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ResourceType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/restart_policy.py b/saturn_api/models/restart_policy.py index f8c682e..3844685 100644 --- a/saturn_api/models/restart_policy.py +++ b/saturn_api/models/restart_policy.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +27,11 @@ class RestartPolicy(str, Enum): """ allowed enum values """ - ALWAYS = 'Always' - NEVER = 'Never' - ONFAILURE = 'OnFailure' + ALWAYS = "Always" + NEVER = "Never" + ONFAILURE = "OnFailure" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RestartPolicy from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/route.py b/saturn_api/models/route.py index c8ca154..fa03d25 100644 --- a/saturn_api/models/route.py +++ b/saturn_api/models/route.py @@ -1,41 +1,58 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class Route(BaseModel): """ Route - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr subdomain: StrictStr = Field(description="Subdomain of the route.") container_port: StrictInt = Field(description="Exposed port in the container.") visibility: StrictStr = Field(description="Describes who is allowed to access the route.") url: StrictStr = Field(description="Full URL of the route.") required: StrictBool = Field(description="True if the route is required for the resource.") - daskcluster_id: Optional[StrictStr] = Field(default=None, description="Dask cluster ID the route is attached to.") - deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID the route is attached to.") - workspace_id: Optional[StrictStr] = Field(default=None, description="Workspace ID the route is attached to.") - __properties: ClassVar[List[str]] = ["id", "subdomain", "container_port", "visibility", "url", "required", "daskcluster_id", "deployment_id", "workspace_id"] + daskcluster_id: Optional[StrictStr] = Field( + default=None, description="Dask cluster ID the route is attached to." + ) + deployment_id: Optional[StrictStr] = Field( + default=None, description="Deployment ID the route is attached to." + ) + workspace_id: Optional[StrictStr] = Field( + default=None, description="Workspace ID the route is attached to." + ) + __properties: ClassVar[List[str]] = [ + "id", + "subdomain", + "container_port", + "visibility", + "url", + "required", + "daskcluster_id", + "deployment_id", + "workspace_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +60,6 @@ class Route(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,17 +93,19 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "subdomain", - "container_port", - "visibility", - "url", - "required", - "daskcluster_id", - "deployment_id", - "workspace_id", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "subdomain", + "container_port", + "visibility", + "url", + "required", + "daskcluster_id", + "deployment_id", + "workspace_id", + ] + ) _dict = self.model_dump( by_alias=True, @@ -105,17 +123,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility"), - "url": obj.get("url"), - "required": obj.get("required"), - "daskcluster_id": obj.get("daskcluster_id"), - "deployment_id": obj.get("deployment_id"), - "workspace_id": obj.get("workspace_id") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility"), + "url": obj.get("url"), + "required": obj.get("required"), + "daskcluster_id": obj.get("daskcluster_id"), + "deployment_id": obj.get("deployment_id"), + "workspace_id": obj.get("workspace_id"), + } + ) return _obj - - diff --git a/saturn_api/models/route_by_container_port.py b/saturn_api/models/route_by_container_port.py index d9083d7..4ba66c3 100644 --- a/saturn_api/models/route_by_container_port.py +++ b/saturn_api/models/route_by_container_port.py @@ -1,32 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class RouteByContainerPort(BaseModel): """ RouteByContainerPort - """ # noqa: E501 + """ # noqa: E501 + container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] __properties: ClassVar[List[str]] = ["container_port"] @@ -36,7 +36,6 @@ class RouteByContainerPort(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "container_port": obj.get("container_port") - }) + _obj = cls.model_validate({"container_port": obj.get("container_port")}) return _obj - - diff --git a/saturn_api/models/route_by_id.py b/saturn_api/models/route_by_id.py index 5f95b27..b556252 100644 --- a/saturn_api/models/route_by_id.py +++ b/saturn_api/models/route_by_id.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class RouteById(BaseModel): """ RouteById - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr __properties: ClassVar[List[str]] = ["id"] @@ -35,7 +36,6 @@ class RouteById(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id") - }) + _obj = cls.model_validate({"id": obj.get("id")}) return _obj - - diff --git a/saturn_api/models/route_by_subdomain.py b/saturn_api/models/route_by_subdomain.py index d70dead..87d01f9 100644 --- a/saturn_api/models/route_by_subdomain.py +++ b/saturn_api/models/route_by_subdomain.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class RouteBySubdomain(BaseModel): """ RouteBySubdomain - """ # noqa: E501 + """ # noqa: E501 + subdomain: StrictStr __properties: ClassVar[List[str]] = ["subdomain"] @@ -35,7 +36,6 @@ class RouteBySubdomain(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subdomain": obj.get("subdomain") - }) + _obj = cls.model_validate({"subdomain": obj.get("subdomain")}) return _obj - - diff --git a/saturn_api/models/route_create.py b/saturn_api/models/route_create.py index b5f922c..f966af7 100644 --- a/saturn_api/models/route_create.py +++ b/saturn_api/models/route_create.py @@ -1,45 +1,49 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class RouteCreate(BaseModel): """ RouteCreate - """ # noqa: E501 + """ # noqa: E501 + subdomain: StrictStr = Field(description="Subdomain of the route.") - container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] = Field(description="Exposed port in the container.") - visibility: Literal['unauthenticated', 'account', 'org', 'owner'] | None = None + container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] = Field( + description="Exposed port in the container." + ) + visibility: Literal["unauthenticated", "account", "org", "owner"] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator('visibility') + @field_validator("visibility") def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['unauthenticated', 'account', 'org', 'owner']): - raise ValueError("must be one of enum values ('unauthenticated', 'account', 'org', 'owner')") + if value not in set(["unauthenticated", "account", "org", "owner"]): + raise ValueError( + "must be one of enum values ('unauthenticated', 'account', 'org', 'owner')" + ) return value model_config = ConfigDict( @@ -48,7 +52,6 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -92,11 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility") - }) + _obj = cls.model_validate( + { + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility"), + } + ) return _obj - - diff --git a/saturn_api/models/route_list.py b/saturn_api/models/route_list.py index f4f2d40..7e7c444 100644 --- a/saturn_api/models/route_list.py +++ b/saturn_api/models/route_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.route import Route -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.route import Route + + class RouteList(BaseModel): """ RouteList - """ # noqa: E501 + """ # noqa: E501 + routes: List[Route] = Field(description="List of routes.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class RouteList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "routes", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "routes", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict['routes'] = _items + _dict["routes"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "routes": [Route.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "routes": ( + [Route.from_dict(_item) for _item in obj["routes"]] + if obj.get("routes") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/route_reference.py b/saturn_api/models/route_reference.py index 5b12220..64f7af9 100644 --- a/saturn_api/models/route_reference.py +++ b/saturn_api/models/route_reference.py @@ -1,37 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.route_by_container_port import RouteByContainerPort from saturn_api.models.route_by_id import RouteById from saturn_api.models.route_by_subdomain import RouteBySubdomain -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar ROUTEREFERENCE_ONE_OF_SCHEMAS = ["RouteByContainerPort", "RouteById", "RouteBySubdomain", "str"] -T = TypeVar("T", RouteByContainerPort, RouteById, RouteBySubdomain, str, default=Union[RouteByContainerPort, RouteById, RouteBySubdomain, str]) +T = TypeVar( + "T", + RouteByContainerPort, + RouteById, + RouteBySubdomain, + str, + default=Union[RouteByContainerPort, RouteById, RouteBySubdomain, str], +) + class RouteReference(RootModel[T]): """ RouteReference """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -68,5 +85,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/route_state.py b/saturn_api/models/route_state.py index 884d1a9..309e289 100644 --- a/saturn_api/models/route_state.py +++ b/saturn_api/models/route_state.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class RouteState(BaseModel): """ RouteState - """ # noqa: E501 + """ # noqa: E501 + subdomain: StrictStr container_port: StrictInt url: StrictStr @@ -37,7 +38,6 @@ class RouteState(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,11 +65,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "subdomain", - "container_port", - "url", - ]) + excluded_fields: Set[str] = set( + [ + "subdomain", + "container_port", + "url", + ] + ) _dict = self.model_dump( by_alias=True, @@ -87,11 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "url": obj.get("url") - }) + _obj = cls.model_validate( + { + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "url": obj.get("url"), + } + ) return _obj - - diff --git a/saturn_api/models/route_update.py b/saturn_api/models/route_update.py index e1783f7..a7a1ae3 100644 --- a/saturn_api/models/route_update.py +++ b/saturn_api/models/route_update.py @@ -1,45 +1,49 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class RouteUpdate(BaseModel): """ RouteUpdate - """ # noqa: E501 + """ # noqa: E501 + subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain of the route.") - container_port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Exposed port in the container.") - visibility: Literal['unauthenticated', 'account', 'org', 'owner'] | None = None + container_port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field( + default=None, description="Exposed port in the container." + ) + visibility: Literal["unauthenticated", "account", "org", "owner"] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator('visibility') + @field_validator("visibility") def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['unauthenticated', 'account', 'org', 'owner']): - raise ValueError("must be one of enum values ('unauthenticated', 'account', 'org', 'owner')") + if value not in set(["unauthenticated", "account", "org", "owner"]): + raise ValueError( + "must be one of enum values ('unauthenticated', 'account', 'org', 'owner')" + ) return value model_config = ConfigDict( @@ -48,7 +52,6 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -92,11 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subdomain": obj.get("subdomain"), - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility") - }) + _obj = cls.model_validate( + { + "subdomain": obj.get("subdomain"), + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility"), + } + ) return _obj - - diff --git a/saturn_api/models/secret.py b/saturn_api/models/secret.py index 416bb68..a04caa7 100644 --- a/saturn_api/models/secret.py +++ b/saturn_api/models/secret.py @@ -1,39 +1,43 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.owner import Owner from saturn_api.models.secret_access_level import SecretAccessLevel -from typing import Literal, Optional, Set -from typing_extensions import Self + class Secret(BaseModel): """ Secret - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the secret.") name: StrictStr = Field(description="Name of the secret.") owner: Owner = Field(description="Owner of the secret.") created_at: StrictStr = Field(description="Creation timestamp.") access: SecretAccessLevel - editable: Optional[StrictBool] = Field(default=None, description="True if the secret is editable by the authenticated user/group.") + editable: Optional[StrictBool] = Field( + default=None, description="True if the secret is editable by the authenticated user/group." + ) __properties: ClassVar[List[str]] = ["id", "name", "owner", "created_at", "access", "editable"] model_config = ConfigDict( @@ -42,7 +46,6 @@ class Secret(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,13 +75,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "created_at", - "editable", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "created_at", + "editable", + ] + ) _dict = self.model_dump( by_alias=True, @@ -87,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -99,14 +104,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "created_at": obj.get("created_at"), - "access": obj.get("access"), - "editable": obj.get("editable") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "created_at": obj.get("created_at"), + "access": obj.get("access"), + "editable": obj.get("editable"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_access_level.py b/saturn_api/models/secret_access_level.py index df1a1a1..4d15bdd 100644 --- a/saturn_api/models/secret_access_level.py +++ b/saturn_api/models/secret_access_level.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +27,10 @@ class SecretAccessLevel(str, Enum): """ allowed enum values """ - ORG = 'org' - OWNER = 'owner' + ORG = "org" + OWNER = "owner" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SecretAccessLevel from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/secret_attachment.py b/saturn_api/models/secret_attachment.py index 6af5254..9890654 100644 --- a/saturn_api/models/secret_attachment.py +++ b/saturn_api/models/secret_attachment.py @@ -1,40 +1,51 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.secret import Secret from saturn_api.models.secret_attachment_type import SecretAttachmentType -from typing import Literal, Optional, Set -from typing_extensions import Self + class SecretAttachment(BaseModel): """ SecretAttachment - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the secret attachment.") created_at: StrictStr = Field(description="Creation timestamp.") attachment_type: SecretAttachmentType - location: StrictStr = Field(description="Location of the attachment on the resource. Format depends on attachment type.") + location: StrictStr = Field( + description="Location of the attachment on the resource. Format depends on attachment type." + ) description: StrictStr = Field(description="Description of the secret attachment.") secret: Optional[Secret] = Field(description="Secret attached to the resource.") - __properties: ClassVar[List[str]] = ["id", "created_at", "attachment_type", "location", "description", "secret"] + __properties: ClassVar[List[str]] = [ + "id", + "created_at", + "attachment_type", + "location", + "description", + "secret", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +53,6 @@ class SecretAttachment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,13 +82,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "location", - "description", - "secret", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "location", + "description", + "secret", + ] + ) _dict = self.model_dump( by_alias=True, @@ -87,11 +99,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict['secret'] = self.secret.to_dict() + _dict["secret"] = self.secret.to_dict() # set to None if secret (nullable) is None # and model_fields_set contains the field if self.secret is None and "secret" in self.model_fields_set: - _dict['secret'] = None + _dict["secret"] = None return _dict @@ -104,14 +116,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "attachment_type": obj.get("attachment_type"), - "location": obj.get("location"), - "description": obj.get("description"), - "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "attachment_type": obj.get("attachment_type"), + "location": obj.get("location"), + "description": obj.get("description"), + "secret": ( + Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/secret_attachment_create.py b/saturn_api/models/secret_attachment_create.py index 59b96f5..b24616d 100644 --- a/saturn_api/models/secret_attachment_create.py +++ b/saturn_api/models/secret_attachment_create.py @@ -1,40 +1,56 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_create import SecretCreate -from typing import Literal, Optional, Set -from typing_extensions import Self + class SecretAttachmentCreate(BaseModel): """ SecretAttachmentCreate - """ # noqa: E501 + """ # noqa: E501 + attachment_type: Optional[SecretAttachmentType] = None - location: Optional[StrictStr] = Field(default=None, description="Location of the attachment on the resource. Format depends on attachment type.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the secret attachment.") - secret: Optional[SecretCreate] = Field(default=None, description="New secret to create and attach to the resource.") - secret_id: Optional[StrictStr] = Field(default=None, description="Secret ID attached to the resource.") - __properties: ClassVar[List[str]] = ["attachment_type", "location", "description", "secret", "secret_id"] + location: Optional[StrictStr] = Field( + default=None, + description="Location of the attachment on the resource. Format depends on attachment type.", + ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default="", description="Description of the secret attachment." + ) + secret: Optional[SecretCreate] = Field( + default=None, description="New secret to create and attach to the resource." + ) + secret_id: Optional[StrictStr] = Field( + default=None, description="Secret ID attached to the resource." + ) + __properties: ClassVar[List[str]] = [ + "attachment_type", + "location", + "description", + "secret", + "secret_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +58,6 @@ class SecretAttachmentCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,16 +91,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict['secret'] = self.secret.to_dict() + _dict["secret"] = self.secret.to_dict() # set to None if secret (nullable) is None # and model_fields_set contains the field if self.secret is None and "secret" in self.model_fields_set: - _dict['secret'] = None + _dict["secret"] = None # set to None if secret_id (nullable) is None # and model_fields_set contains the field if self.secret_id is None and "secret_id" in self.model_fields_set: - _dict['secret_id'] = None + _dict["secret_id"] = None return _dict @@ -99,13 +113,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "attachment_type": obj.get("attachment_type"), - "location": obj.get("location"), - "description": obj.get("description") if obj.get("description") is not None else '', - "secret": SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None, - "secret_id": obj.get("secret_id") - }) + _obj = cls.model_validate( + { + "attachment_type": obj.get("attachment_type"), + "location": obj.get("location"), + "description": obj.get("description") if obj.get("description") is not None else "", + "secret": ( + SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None + ), + "secret_id": obj.get("secret_id"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_attachment_list.py b/saturn_api/models/secret_attachment_list.py index 0799e2a..03b2953 100644 --- a/saturn_api/models/secret_attachment_list.py +++ b/saturn_api/models/secret_attachment_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.secret_attachment import SecretAttachment -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.secret_attachment import SecretAttachment + + class SecretAttachmentList(BaseModel): """ SecretAttachmentList - """ # noqa: E501 + """ # noqa: E501 + secret_attachments: List[SecretAttachment] = Field(description="List of secret attachments.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class SecretAttachmentList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "secret_attachments", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "secret_attachments", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_secret_attachments in self.secret_attachments: if _item_secret_attachments: _items.append(_item_secret_attachments.to_dict()) - _dict['secret_attachments'] = _items + _dict["secret_attachments"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "secret_attachments": [SecretAttachment.from_dict(_item) for _item in obj["secret_attachments"]] if obj.get("secret_attachments") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "secret_attachments": ( + [SecretAttachment.from_dict(_item) for _item in obj["secret_attachments"]] + if obj.get("secret_attachments") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_attachment_recipe.py b/saturn_api/models/secret_attachment_recipe.py index ba73e88..467ff35 100644 --- a/saturn_api/models/secret_attachment_recipe.py +++ b/saturn_api/models/secret_attachment_recipe.py @@ -1,40 +1,47 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_type import SecretAttachmentType -from typing import Literal, Optional, Set -from typing_extensions import Self + class SecretAttachmentRecipe(BaseModel): """ SecretAttachmentRecipe - """ # noqa: E501 + """ # noqa: E501 + location: StrictStr attachment_type: SecretAttachmentType - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = '' + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = "" owner: Optional[OwnerReference] = None name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["location", "attachment_type", "description", "owner", "name"] + __properties: ClassVar[List[str]] = [ + "location", + "attachment_type", + "description", + "owner", + "name", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +49,6 @@ class SecretAttachmentRecipe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -89,13 +94,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "location": obj.get("location"), - "attachment_type": obj.get("attachment_type"), - "description": obj.get("description") if obj.get("description") is not None else '', - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "name": obj.get("name") - }) + _obj = cls.model_validate( + { + "location": obj.get("location"), + "attachment_type": obj.get("attachment_type"), + "description": obj.get("description") if obj.get("description") is not None else "", + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "name": obj.get("name"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_attachment_type.py b/saturn_api/models/secret_attachment_type.py index 0da5f3b..4fdb2b4 100644 --- a/saturn_api/models/secret_attachment_type.py +++ b/saturn_api/models/secret_attachment_type.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +27,10 @@ class SecretAttachmentType(str, Enum): """ allowed enum values """ - ENVIRONMENT_VARIABLE = 'environment_variable' - FILE = 'file' + ENVIRONMENT_VARIABLE = "environment_variable" + FILE = "file" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SecretAttachmentType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/secret_attachment_update.py b/saturn_api/models/secret_attachment_update.py index 9e9030a..4915c1f 100644 --- a/saturn_api/models/secret_attachment_update.py +++ b/saturn_api/models/secret_attachment_update.py @@ -1,40 +1,56 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from saturn_api.models.secret_attachment_type import SecretAttachmentType from saturn_api.models.secret_create import SecretCreate -from typing import Literal, Optional, Set -from typing_extensions import Self + class SecretAttachmentUpdate(BaseModel): """ SecretAttachmentUpdate - """ # noqa: E501 + """ # noqa: E501 + attachment_type: Optional[SecretAttachmentType] = None - location: Optional[StrictStr] = Field(default=None, description="Location of the attachment on the resource. Format depends on attachment type.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the secret attachment.") - secret: Optional[SecretCreate] = Field(default=None, description="New secret to create and attach to the resource.") - secret_id: Optional[StrictStr] = Field(default=None, description="Secret ID attached to the resource.") - __properties: ClassVar[List[str]] = ["attachment_type", "location", "description", "secret", "secret_id"] + location: Optional[StrictStr] = Field( + default=None, + description="Location of the attachment on the resource. Format depends on attachment type.", + ) + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default=None, description="Description of the secret attachment." + ) + secret: Optional[SecretCreate] = Field( + default=None, description="New secret to create and attach to the resource." + ) + secret_id: Optional[StrictStr] = Field( + default=None, description="Secret ID attached to the resource." + ) + __properties: ClassVar[List[str]] = [ + "attachment_type", + "location", + "description", + "secret", + "secret_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +58,6 @@ class SecretAttachmentUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,16 +91,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict['secret'] = self.secret.to_dict() + _dict["secret"] = self.secret.to_dict() # set to None if secret (nullable) is None # and model_fields_set contains the field if self.secret is None and "secret" in self.model_fields_set: - _dict['secret'] = None + _dict["secret"] = None # set to None if secret_id (nullable) is None # and model_fields_set contains the field if self.secret_id is None and "secret_id" in self.model_fields_set: - _dict['secret_id'] = None + _dict["secret_id"] = None return _dict @@ -99,13 +113,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "attachment_type": obj.get("attachment_type"), - "location": obj.get("location"), - "description": obj.get("description"), - "secret": SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None, - "secret_id": obj.get("secret_id") - }) + _obj = cls.model_validate( + { + "attachment_type": obj.get("attachment_type"), + "location": obj.get("location"), + "description": obj.get("description"), + "secret": ( + SecretCreate.from_dict(obj["secret"]) if obj.get("secret") is not None else None + ), + "secret_id": obj.get("secret_id"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_create.py b/saturn_api/models/secret_create.py index 9f9b0f5..7dbb23e 100644 --- a/saturn_api/models/secret_create.py +++ b/saturn_api/models/secret_create.py @@ -1,33 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_access_level import SecretAccessLevel -from typing import Literal, Optional, Set -from typing_extensions import Self + class SecretCreate(BaseModel): """ SecretCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the secret.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the secret.") access: Optional[SecretAccessLevel] = None @@ -40,7 +42,6 @@ class SecretCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -87,12 +87,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "access": obj.get("access"), - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "access": obj.get("access"), + "value": obj.get("value"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_list.py b/saturn_api/models/secret_list.py index 58a37a9..e712779 100644 --- a/saturn_api/models/secret_list.py +++ b/saturn_api/models/secret_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.secret import Secret -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.secret import Secret + + class SecretList(BaseModel): """ SecretList - """ # noqa: E501 + """ # noqa: E501 + secrets: List[Secret] = Field(description="List of secrets.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class SecretList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "secrets", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "secrets", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict['secrets'] = _items + _dict["secrets"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "secrets": [Secret.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "secrets": ( + [Secret.from_dict(_item) for _item in obj["secrets"]] + if obj.get("secrets") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/secret_update.py b/saturn_api/models/secret_update.py index f5d1325..30da3dc 100644 --- a/saturn_api/models/secret_update.py +++ b/saturn_api/models/secret_update.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.secret_access_level import SecretAccessLevel -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.secret_access_level import SecretAccessLevel + + class SecretUpdate(BaseModel): """ SecretUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the secret.") access: Optional[SecretAccessLevel] = None value: Optional[StrictStr] = Field(default=None, description="Value of the secret.") @@ -38,7 +40,6 @@ class SecretUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "access": obj.get("access"), - "value": obj.get("value") - }) + _obj = cls.model_validate( + {"name": obj.get("name"), "access": obj.get("access"), "value": obj.get("value")} + ) return _obj - - diff --git a/saturn_api/models/server_options.py b/saturn_api/models/server_options.py index c232eda..1f90eff 100644 --- a/saturn_api/models/server_options.py +++ b/saturn_api/models/server_options.py @@ -1,35 +1,41 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.instance_size import InstanceSize -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.instance_size import InstanceSize + + class ServerOptions(BaseModel): """ ServerOptions - """ # noqa: E501 - auto_shutoff: List[StrictStr] = Field(description="List of available auto-shutoff settings for workspaces.") + """ # noqa: E501 + + auto_shutoff: List[StrictStr] = Field( + description="List of available auto-shutoff settings for workspaces." + ) disk_space: List[StrictStr] = Field(description="List of available disk sizes for workspaces.") - sizes: Dict[str, InstanceSize] = Field(description="Mapping of instance size names to their configurations.") + sizes: Dict[str, InstanceSize] = Field( + description="Mapping of instance size names to their configurations." + ) __properties: ClassVar[List[str]] = ["auto_shutoff", "disk_space", "sizes"] model_config = ConfigDict( @@ -38,7 +44,6 @@ class ServerOptions(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "auto_shutoff", - "disk_space", - "sizes", - ]) + excluded_fields: Set[str] = set( + [ + "auto_shutoff", + "disk_space", + "sizes", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: for _key_sizes in self.sizes: if self.sizes[_key_sizes]: _field_dict[_key_sizes] = self.sizes[_key_sizes].to_dict() - _dict['sizes'] = _field_dict + _dict["sizes"] = _field_dict return _dict @classmethod @@ -95,16 +102,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "auto_shutoff": obj.get("auto_shutoff"), - "disk_space": obj.get("disk_space"), - "sizes": dict( - (_k, InstanceSize.from_dict(_v)) - for _k, _v in obj["sizes"].items() - ) - if obj.get("sizes") is not None - else None - }) + _obj = cls.model_validate( + { + "auto_shutoff": obj.get("auto_shutoff"), + "disk_space": obj.get("disk_space"), + "sizes": ( + dict((_k, InstanceSize.from_dict(_v)) for _k, _v in obj["sizes"].items()) + if obj.get("sizes") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/server_options_size.py b/saturn_api/models/server_options_size.py index 63ccd95..3403441 100644 --- a/saturn_api/models/server_options_size.py +++ b/saturn_api/models/server_options_size.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.instance_size import InstanceSize -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.instance_size import InstanceSize + + class ServerOptionsSize(BaseModel): """ ServerOptionsSize - """ # noqa: E501 + """ # noqa: E501 + size: List[InstanceSize] = Field(description="List of available instance sizes.") __properties: ClassVar[List[str]] = ["size"] @@ -36,7 +38,6 @@ class ServerOptionsSize(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "size", - ]) + excluded_fields: Set[str] = set( + [ + "size", + ] + ) _dict = self.model_dump( by_alias=True, @@ -77,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_size in self.size: if _item_size: _items.append(_item_size.to_dict()) - _dict['size'] = _items + _dict["size"] = _items return _dict @classmethod @@ -89,9 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "size": [InstanceSize.from_dict(_item) for _item in obj["size"]] if obj.get("size") is not None else None - }) + _obj = cls.model_validate( + { + "size": ( + [InstanceSize.from_dict(_item) for _item in obj["size"]] + if obj.get("size") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/service_account.py b/saturn_api/models/service_account.py index 0bd675b..f9802bf 100644 --- a/saturn_api/models/service_account.py +++ b/saturn_api/models/service_account.py @@ -1,36 +1,41 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ServiceAccount(BaseModel): """ ServiceAccount - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the service account.") created_at: StrictStr = Field(description="Creation timestamp") name: StrictStr = Field(description="Name of the service account.") - cloud_role: Optional[StrictStr] = Field(description="Cloud role attached to the service account.") - auto_associate: StrictBool = Field(description="Automatically entitle access to the service account for new users and groups.") + cloud_role: Optional[StrictStr] = Field( + description="Cloud role attached to the service account." + ) + auto_associate: StrictBool = Field( + description="Automatically entitle access to the service account for new users and groups." + ) __properties: ClassVar[List[str]] = ["id", "created_at", "name", "cloud_role", "auto_associate"] model_config = ConfigDict( @@ -39,7 +44,6 @@ class ServiceAccount(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,13 +73,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "name", - "cloud_role", - "auto_associate", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "name", + "cloud_role", + "auto_associate", + ] + ) _dict = self.model_dump( by_alias=True, @@ -85,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if cloud_role (nullable) is None # and model_fields_set contains the field if self.cloud_role is None and "cloud_role" in self.model_fields_set: - _dict['cloud_role'] = None + _dict["cloud_role"] = None return _dict @@ -98,13 +104,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "cloud_role": obj.get("cloud_role"), - "auto_associate": obj.get("auto_associate") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "name": obj.get("name"), + "cloud_role": obj.get("cloud_role"), + "auto_associate": obj.get("auto_associate"), + } + ) return _obj - - diff --git a/saturn_api/models/service_account_attachment.py b/saturn_api/models/service_account_attachment.py index e9c99cf..f362a12 100644 --- a/saturn_api/models/service_account_attachment.py +++ b/saturn_api/models/service_account_attachment.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.service_account import ServiceAccount -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.service_account import ServiceAccount + + class ServiceAccountAttachment(BaseModel): """ ServiceAccountAttachment - """ # noqa: E501 - service_account: ServiceAccount = Field(description="Service account that is attached to the resource.") + """ # noqa: E501 + + service_account: ServiceAccount = Field( + description="Service account that is attached to the resource." + ) __properties: ClassVar[List[str]] = ["service_account"] model_config = ConfigDict( @@ -36,7 +40,6 @@ class ServiceAccountAttachment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,9 +65,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "service_account", - ]) + excluded_fields: Set[str] = set( + [ + "service_account", + ] + ) _dict = self.model_dump( by_alias=True, @@ -73,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_account if self.service_account: - _dict['service_account'] = self.service_account.to_dict() + _dict["service_account"] = self.service_account.to_dict() return _dict @classmethod @@ -85,9 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "service_account": ServiceAccount.from_dict(obj["service_account"]) if obj.get("service_account") is not None else None - }) + _obj = cls.model_validate( + { + "service_account": ( + ServiceAccount.from_dict(obj["service_account"]) + if obj.get("service_account") is not None + else None + ) + } + ) return _obj - - diff --git a/saturn_api/models/service_account_create.py b/saturn_api/models/service_account_create.py index 83d1172..48164dc 100644 --- a/saturn_api/models/service_account_create.py +++ b/saturn_api/models/service_account_create.py @@ -1,35 +1,42 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class ServiceAccountCreate(BaseModel): """ ServiceAccountCreate - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=253)] = Field(description="Name of the service account.") - cloud_role: Optional[StrictStr] = Field(default=None, description="Cloud role attached to the service account.") - auto_associate: Optional[StrictBool] = Field(default=False, description="Automatically grant access to the service account for new users and groups.") + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True, max_length=253)] = Field( + description="Name of the service account." + ) + cloud_role: Optional[StrictStr] = Field( + default=None, description="Cloud role attached to the service account." + ) + auto_associate: Optional[StrictBool] = Field( + default=False, + description="Automatically grant access to the service account for new users and groups.", + ) __properties: ClassVar[List[str]] = ["name", "cloud_role", "auto_associate"] model_config = ConfigDict( @@ -38,7 +45,6 @@ class ServiceAccountCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +69,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if cloud_role (nullable) is None # and model_fields_set contains the field if self.cloud_role is None and "cloud_role" in self.model_fields_set: - _dict['cloud_role'] = None + _dict["cloud_role"] = None return _dict @@ -87,11 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "cloud_role": obj.get("cloud_role"), - "auto_associate": obj.get("auto_associate") if obj.get("auto_associate") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "cloud_role": obj.get("cloud_role"), + "auto_associate": ( + obj.get("auto_associate") if obj.get("auto_associate") is not None else False + ), + } + ) return _obj - - diff --git a/saturn_api/models/service_account_create_attachment.py b/saturn_api/models/service_account_create_attachment.py index d43cf9d..387e669 100644 --- a/saturn_api/models/service_account_create_attachment.py +++ b/saturn_api/models/service_account_create_attachment.py @@ -1,32 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class ServiceAccountCreateAttachment(BaseModel): """ ServiceAccountCreateAttachment - """ # noqa: E501 - service_account_id: StrictStr = Field(description="Service account ID to attach to the resource.") + """ # noqa: E501 + + service_account_id: StrictStr = Field( + description="Service account ID to attach to the resource." + ) __properties: ClassVar[List[str]] = ["service_account_id"] model_config = ConfigDict( @@ -35,7 +38,6 @@ class ServiceAccountCreateAttachment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "service_account_id": obj.get("service_account_id") - }) + _obj = cls.model_validate({"service_account_id": obj.get("service_account_id")}) return _obj - - diff --git a/saturn_api/models/service_account_entitlement.py b/saturn_api/models/service_account_entitlement.py index b667cc1..5a0462f 100644 --- a/saturn_api/models/service_account_entitlement.py +++ b/saturn_api/models/service_account_entitlement.py @@ -1,38 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.service_account import ServiceAccount -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.service_account import ServiceAccount + + class ServiceAccountEntitlement(BaseModel): """ ServiceAccountEntitlement - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the service account entitlement.") created_at: StrictStr = Field(description="Creation timestamp.") service_account: ServiceAccount = Field(description="Entitled service account.") user_id: Optional[StrictStr] = Field(description="User ID that is entitled.") group_id: Optional[StrictStr] = Field(description="Group ID that is entitled.") - __properties: ClassVar[List[str]] = ["id", "created_at", "service_account", "user_id", "group_id"] + __properties: ClassVar[List[str]] = [ + "id", + "created_at", + "service_account", + "user_id", + "group_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +48,6 @@ class ServiceAccountEntitlement(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,13 +77,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "service_account", - "user_id", - "group_id", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "service_account", + "user_id", + "group_id", + ] + ) _dict = self.model_dump( by_alias=True, @@ -85,16 +94,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_account if self.service_account: - _dict['service_account'] = self.service_account.to_dict() + _dict["service_account"] = self.service_account.to_dict() # set to None if user_id (nullable) is None # and model_fields_set contains the field if self.user_id is None and "user_id" in self.model_fields_set: - _dict['user_id'] = None + _dict["user_id"] = None # set to None if group_id (nullable) is None # and model_fields_set contains the field if self.group_id is None and "group_id" in self.model_fields_set: - _dict['group_id'] = None + _dict["group_id"] = None return _dict @@ -107,13 +116,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "service_account": ServiceAccount.from_dict(obj["service_account"]) if obj.get("service_account") is not None else None, - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "service_account": ( + ServiceAccount.from_dict(obj["service_account"]) + if obj.get("service_account") is not None + else None + ), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + } + ) return _obj - - diff --git a/saturn_api/models/service_account_entitlement_create.py b/saturn_api/models/service_account_entitlement_create.py index ea049f0..5161ce1 100644 --- a/saturn_api/models/service_account_entitlement_create.py +++ b/saturn_api/models/service_account_entitlement_create.py @@ -1,34 +1,40 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity_reference import IdentityReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity_reference import IdentityReference + + class ServiceAccountEntitlementCreate(BaseModel): """ ServiceAccountEntitlementCreate - """ # noqa: E501 - service_account_id: StrictStr = Field(description="ID of the service account to entitle the identity to.") - identity: Optional[IdentityReference] = Field(default=None, description="Reference to an identity.") + """ # noqa: E501 + + service_account_id: StrictStr = Field( + description="ID of the service account to entitle the identity to." + ) + identity: Optional[IdentityReference] = Field( + default=None, description="Reference to an identity." + ) __properties: ClassVar[List[str]] = ["service_account_id", "identity"] model_config = ConfigDict( @@ -37,7 +43,6 @@ class ServiceAccountEntitlementCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() return _dict @classmethod @@ -84,10 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "service_account_id": obj.get("service_account_id"), - "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None - }) + _obj = cls.model_validate( + { + "service_account_id": obj.get("service_account_id"), + "identity": ( + IdentityReference.from_dict(obj["identity"]) + if obj.get("identity") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/service_account_entitlement_list.py b/saturn_api/models/service_account_entitlement_list.py index 6300878..ae70dec 100644 --- a/saturn_api/models/service_account_entitlement_list.py +++ b/saturn_api/models/service_account_entitlement_list.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.service_account_entitlement import ServiceAccountEntitlement + + class ServiceAccountEntitlementList(BaseModel): """ ServiceAccountEntitlementList - """ # noqa: E501 - service_account_entitlements: List[ServiceAccountEntitlement] = Field(description="List of service account entitlements.") + """ # noqa: E501 + + service_account_entitlements: List[ServiceAccountEntitlement] = Field( + description="List of service account entitlements." + ) prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["service_account_entitlements", "prev_key", "next_key"] @@ -38,7 +42,6 @@ class ServiceAccountEntitlementList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +69,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "service_account_entitlements", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "service_account_entitlements", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_service_account_entitlements in self.service_account_entitlements: if _item_service_account_entitlements: _items.append(_item_service_account_entitlements.to_dict()) - _dict['service_account_entitlements'] = _items + _dict["service_account_entitlements"] = _items return _dict @classmethod @@ -95,11 +100,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "service_account_entitlements": [ServiceAccountEntitlement.from_dict(_item) for _item in obj["service_account_entitlements"]] if obj.get("service_account_entitlements") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "service_account_entitlements": ( + [ + ServiceAccountEntitlement.from_dict(_item) + for _item in obj["service_account_entitlements"] + ] + if obj.get("service_account_entitlements") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/service_account_list.py b/saturn_api/models/service_account_list.py index cd37867..fd589e8 100644 --- a/saturn_api/models/service_account_list.py +++ b/saturn_api/models/service_account_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.service_account import ServiceAccount -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.service_account import ServiceAccount + + class ServiceAccountList(BaseModel): """ ServiceAccountList - """ # noqa: E501 + """ # noqa: E501 + service_accounts: List[ServiceAccount] = Field(description="List of service accounts.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ServiceAccountList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "service_accounts", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "service_accounts", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_service_accounts in self.service_accounts: if _item_service_accounts: _items.append(_item_service_accounts.to_dict()) - _dict['service_accounts'] = _items + _dict["service_accounts"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "service_accounts": [ServiceAccount.from_dict(_item) for _item in obj["service_accounts"]] if obj.get("service_accounts") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "service_accounts": ( + [ServiceAccount.from_dict(_item) for _item in obj["service_accounts"]] + if obj.get("service_accounts") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/service_account_update.py b/saturn_api/models/service_account_update.py index 2930d43..17b5d4b 100644 --- a/saturn_api/models/service_account_update.py +++ b/saturn_api/models/service_account_update.py @@ -1,33 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class ServiceAccountUpdate(BaseModel): """ ServiceAccountUpdate - """ # noqa: E501 - cloud_role: Optional[StrictStr] = Field(default=None, description="Cloud role attached to the service account.") - auto_associate: Optional[StrictBool] = Field(default=None, description="Automatically grant access to the service account for new users and groups.") + """ # noqa: E501 + + cloud_role: Optional[StrictStr] = Field( + default=None, description="Cloud role attached to the service account." + ) + auto_associate: Optional[StrictBool] = Field( + default=None, + description="Automatically grant access to the service account for new users and groups.", + ) __properties: ClassVar[List[str]] = ["cloud_role", "auto_associate"] model_config = ConfigDict( @@ -36,7 +42,6 @@ class ServiceAccountUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if cloud_role (nullable) is None # and model_fields_set contains the field if self.cloud_role is None and "cloud_role" in self.model_fields_set: - _dict['cloud_role'] = None + _dict["cloud_role"] = None return _dict @@ -85,10 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "cloud_role": obj.get("cloud_role"), - "auto_associate": obj.get("auto_associate") - }) + _obj = cls.model_validate( + {"cloud_role": obj.get("cloud_role"), "auto_associate": obj.get("auto_associate")} + ) return _obj - - diff --git a/saturn_api/models/shared_access_mode.py b/saturn_api/models/shared_access_mode.py index e81bfff..fbc01f6 100644 --- a/saturn_api/models/shared_access_mode.py +++ b/saturn_api/models/shared_access_mode.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +27,10 @@ class SharedAccessMode(str, Enum): """ allowed enum values """ - READONLYMANY = 'ReadOnlyMany' - READWRITEMANY = 'ReadWriteMany' + READONLYMANY = "ReadOnlyMany" + READWRITEMANY = "ReadWriteMany" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SharedAccessMode from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/shared_folder.py b/saturn_api/models/shared_folder.py index 0e8d789..b9e3cc9 100644 --- a/saturn_api/models/shared_folder.py +++ b/saturn_api/models/shared_folder.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from saturn_api.models.owner import Owner from saturn_api.models.shared_access_mode import SharedAccessMode from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel -from typing import Literal, Optional, Set -from typing_extensions import Self + class SharedFolder(BaseModel): """ SharedFolder - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the shared folder.") name: StrictStr = Field(description="Name of the shared folder.") owner: Owner = Field(description="Owner of the shared folder.") @@ -36,8 +38,19 @@ class SharedFolder(BaseModel): access: SharedFolderAccessLevel access_mode: SharedAccessMode is_external: StrictBool = Field(description="True if the shared folder is externally managed.") - editable: StrictBool = Field(description="True if the shard folder is editable by the authenticated user/group.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "created_at", "access", "access_mode", "is_external", "editable"] + editable: StrictBool = Field( + description="True if the shard folder is editable by the authenticated user/group." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "created_at", + "access", + "access_mode", + "is_external", + "editable", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +58,6 @@ class SharedFolder(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,14 +88,16 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "created_at", - "is_external", - "editable", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "created_at", + "is_external", + "editable", + ] + ) _dict = self.model_dump( by_alias=True, @@ -92,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -104,16 +118,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "created_at": obj.get("created_at"), - "access": obj.get("access"), - "access_mode": obj.get("access_mode"), - "is_external": obj.get("is_external"), - "editable": obj.get("editable") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "created_at": obj.get("created_at"), + "access": obj.get("access"), + "access_mode": obj.get("access_mode"), + "is_external": obj.get("is_external"), + "editable": obj.get("editable"), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_access_level.py b/saturn_api/models/shared_folder_access_level.py index 1292b95..cd69f99 100644 --- a/saturn_api/models/shared_folder_access_level.py +++ b/saturn_api/models/shared_folder_access_level.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +27,10 @@ class SharedFolderAccessLevel(str, Enum): """ allowed enum values """ - ORG = 'org' - OWNER = 'owner' + ORG = "org" + OWNER = "owner" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SharedFolderAccessLevel from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/shared_folder_attachment.py b/saturn_api/models/shared_folder_attachment.py index b47dacf..c2fe8fa 100644 --- a/saturn_api/models/shared_folder_attachment.py +++ b/saturn_api/models/shared_folder_attachment.py @@ -1,38 +1,48 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.shared_folder import SharedFolder -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.shared_folder import SharedFolder + + class SharedFolderAttachment(BaseModel): """ SharedFolderAttachment - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the shared folder attachment") - shared_folder: SharedFolder = Field(description="Shared folder that is attached to the resource.") + shared_folder: SharedFolder = Field( + description="Shared folder that is attached to the resource." + ) workspace_id: StrictStr = Field(description="Workspace ID of the shared folder attachment.") deployment_id: StrictStr = Field(description="Deployment ID of the shared folder attachment.") path: StrictStr = Field(description="Mount path of the shared folder in the resource.") - __properties: ClassVar[List[str]] = ["id", "shared_folder", "workspace_id", "deployment_id", "path"] + __properties: ClassVar[List[str]] = [ + "id", + "shared_folder", + "workspace_id", + "deployment_id", + "path", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +50,6 @@ class SharedFolderAttachment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,13 +79,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "shared_folder", - "workspace_id", - "deployment_id", - "path", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "shared_folder", + "workspace_id", + "deployment_id", + "path", + ] + ) _dict = self.model_dump( by_alias=True, @@ -85,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of shared_folder if self.shared_folder: - _dict['shared_folder'] = self.shared_folder.to_dict() + _dict["shared_folder"] = self.shared_folder.to_dict() return _dict @classmethod @@ -97,13 +108,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "shared_folder": SharedFolder.from_dict(obj["shared_folder"]) if obj.get("shared_folder") is not None else None, - "workspace_id": obj.get("workspace_id"), - "deployment_id": obj.get("deployment_id"), - "path": obj.get("path") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "shared_folder": ( + SharedFolder.from_dict(obj["shared_folder"]) + if obj.get("shared_folder") is not None + else None + ), + "workspace_id": obj.get("workspace_id"), + "deployment_id": obj.get("deployment_id"), + "path": obj.get("path"), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_attachment_create.py b/saturn_api/models/shared_folder_attachment_create.py index 0690a02..6520982 100644 --- a/saturn_api/models/shared_folder_attachment_create.py +++ b/saturn_api/models/shared_folder_attachment_create.py @@ -1,35 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.resource_reference import ResourceReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.resource_reference import ResourceReference + + class SharedFolderAttachmentCreate(BaseModel): """ SharedFolderAttachmentCreate - """ # noqa: E501 + """ # noqa: E501 + shared_folder_id: StrictStr = Field(description="Shared folder ID to attach to the resource.") resource: ResourceReference = Field(description="Reference to a resource.") - path: Optional[StrictStr] = Field(default=None, description="Mount path of the shared folder in the resource.") + path: Optional[StrictStr] = Field( + default=None, description="Mount path of the shared folder in the resource." + ) __properties: ClassVar[List[str]] = ["shared_folder_id", "resource", "path"] model_config = ConfigDict( @@ -38,7 +42,6 @@ class SharedFolderAttachmentCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of resource if self.resource: - _dict['resource'] = self.resource.to_dict() + _dict["resource"] = self.resource.to_dict() return _dict @classmethod @@ -85,11 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "shared_folder_id": obj.get("shared_folder_id"), - "resource": ResourceReference.from_dict(obj["resource"]) if obj.get("resource") is not None else None, - "path": obj.get("path") - }) + _obj = cls.model_validate( + { + "shared_folder_id": obj.get("shared_folder_id"), + "resource": ( + ResourceReference.from_dict(obj["resource"]) + if obj.get("resource") is not None + else None + ), + "path": obj.get("path"), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_attachment_list.py b/saturn_api/models/shared_folder_attachment_list.py index 7cadff1..c4a85cd 100644 --- a/saturn_api/models/shared_folder_attachment_list.py +++ b/saturn_api/models/shared_folder_attachment_list.py @@ -1,33 +1,37 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.shared_folder_attachment import SharedFolderAttachment -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.shared_folder_attachment import SharedFolderAttachment + + class SharedFolderAttachmentList(BaseModel): """ SharedFolderAttachmentList - """ # noqa: E501 - shared_folder_attachments: List[SharedFolderAttachment] = Field(description="List of shared folder attachments.") + """ # noqa: E501 + + shared_folder_attachments: List[SharedFolderAttachment] = Field( + description="List of shared folder attachments." + ) prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") __properties: ClassVar[List[str]] = ["shared_folder_attachments", "prev_key", "next_key"] @@ -38,7 +42,6 @@ class SharedFolderAttachmentList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +69,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "shared_folder_attachments", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "shared_folder_attachments", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_shared_folder_attachments in self.shared_folder_attachments: if _item_shared_folder_attachments: _items.append(_item_shared_folder_attachments.to_dict()) - _dict['shared_folder_attachments'] = _items + _dict["shared_folder_attachments"] = _items return _dict @classmethod @@ -95,11 +100,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "shared_folder_attachments": [SharedFolderAttachment.from_dict(_item) for _item in obj["shared_folder_attachments"]] if obj.get("shared_folder_attachments") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "shared_folder_attachments": ( + [ + SharedFolderAttachment.from_dict(_item) + for _item in obj["shared_folder_attachments"] + ] + if obj.get("shared_folder_attachments") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_attachment_recipe.py b/saturn_api/models/shared_folder_attachment_recipe.py index c4212e7..a5f1767 100644 --- a/saturn_api/models/shared_folder_attachment_recipe.py +++ b/saturn_api/models/shared_folder_attachment_recipe.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_reference import OwnerReference + + class SharedFolderAttachmentRecipe(BaseModel): """ SharedFolderAttachmentRecipe - """ # noqa: E501 + """ # noqa: E501 + owner: Optional[OwnerReference] = None name: StrictStr path: Optional[StrictStr] = None @@ -38,7 +40,6 @@ class SharedFolderAttachmentRecipe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -85,11 +85,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "name": obj.get("name"), - "path": obj.get("path") - }) + _obj = cls.model_validate( + { + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "name": obj.get("name"), + "path": obj.get("path"), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_attachment_update.py b/saturn_api/models/shared_folder_attachment_update.py index 7a8f47b..47cecb2 100644 --- a/saturn_api/models/shared_folder_attachment_update.py +++ b/saturn_api/models/shared_folder_attachment_update.py @@ -1,32 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class SharedFolderAttachmentUpdate(BaseModel): """ SharedFolderAttachmentUpdate - """ # noqa: E501 - path: Optional[StrictStr] = Field(default=None, description="Mount path of the shared folder in the resource.") + """ # noqa: E501 + + path: Optional[StrictStr] = Field( + default=None, description="Mount path of the shared folder in the resource." + ) __properties: ClassVar[List[str]] = ["path"] model_config = ConfigDict( @@ -35,7 +38,6 @@ class SharedFolderAttachmentUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "path": obj.get("path") - }) + _obj = cls.model_validate({"path": obj.get("path")}) return _obj - - diff --git a/saturn_api/models/shared_folder_create.py b/saturn_api/models/shared_folder_create.py index 0ad4560..3a7627c 100644 --- a/saturn_api/models/shared_folder_create.py +++ b/saturn_api/models/shared_folder_create.py @@ -1,39 +1,43 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.shared_access_mode import SharedAccessMode from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel -from typing import Literal, Optional, Set -from typing_extensions import Self + class SharedFolderCreate(BaseModel): """ SharedFolderCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the shared folder.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the shared folder.") access: Optional[SharedFolderAccessLevel] = None access_mode: Optional[SharedAccessMode] = None - is_external: Optional[StrictBool] = Field(default=False, description="True if the shared folder is externally managed.") + is_external: Optional[StrictBool] = Field( + default=False, description="True if the shared folder is externally managed." + ) __properties: ClassVar[List[str]] = ["name", "owner", "access", "access_mode", "is_external"] model_config = ConfigDict( @@ -42,7 +46,6 @@ class SharedFolderCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() return _dict @classmethod @@ -89,13 +91,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "access": obj.get("access"), - "access_mode": obj.get("access_mode"), - "is_external": obj.get("is_external") if obj.get("is_external") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "access": obj.get("access"), + "access_mode": obj.get("access_mode"), + "is_external": ( + obj.get("is_external") if obj.get("is_external") is not None else False + ), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_list.py b/saturn_api/models/shared_folder_list.py index 4029a45..063f5e1 100644 --- a/saturn_api/models/shared_folder_list.py +++ b/saturn_api/models/shared_folder_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.shared_folder import SharedFolder -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.shared_folder import SharedFolder + + class SharedFolderList(BaseModel): """ SharedFolderList - """ # noqa: E501 + """ # noqa: E501 + shared_folders: List[SharedFolder] = Field(description="List of shared folders.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class SharedFolderList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "shared_folders", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "shared_folders", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict['shared_folders'] = _items + _dict["shared_folders"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "shared_folders": [SharedFolder.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "shared_folders": ( + [SharedFolder.from_dict(_item) for _item in obj["shared_folders"]] + if obj.get("shared_folders") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/shared_folder_update.py b/saturn_api/models/shared_folder_update.py index 241401c..bf0ae8d 100644 --- a/saturn_api/models/shared_folder_update.py +++ b/saturn_api/models/shared_folder_update.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.shared_folder_access_level import SharedFolderAccessLevel + + class SharedFolderUpdate(BaseModel): """ SharedFolderUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the shared folder.") access: Optional[SharedFolderAccessLevel] = None __properties: ClassVar[List[str]] = ["name", "access"] @@ -37,7 +39,6 @@ class SharedFolderUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "access": obj.get("access") - }) + _obj = cls.model_validate({"name": obj.get("name"), "access": obj.get("access")}) return _obj - - diff --git a/saturn_api/models/ssh_private_key.py b/saturn_api/models/ssh_private_key.py index f524bc2..151b831 100644 --- a/saturn_api/models/ssh_private_key.py +++ b/saturn_api/models/ssh_private_key.py @@ -1,40 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity import Identity -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity import Identity + + class SSHPrivateKey(BaseModel): """ SSHPrivateKey - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the SSH private key.") name: StrictStr = Field(description="Name of the SSH private key.") identity: Identity = Field(description="Identity that owns the SSH private key.") created_at: StrictStr = Field(description="Creation timestamp.") - public_key: Optional[StrictStr] = Field(description="SSH public key associated with the private key.") + public_key: Optional[StrictStr] = Field( + description="SSH public key associated with the private key." + ) location: StrictStr = Field(description="Path to the SSH private key in resources.") - is_default: StrictBool = Field(description="Enable SSH private key to be used for any external repositories that do not specify a key.") - __properties: ClassVar[List[str]] = ["id", "name", "identity", "created_at", "public_key", "location", "is_default"] + is_default: StrictBool = Field( + description="Enable SSH private key to be used for any external repositories that do not specify a key." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "identity", + "created_at", + "public_key", + "location", + "is_default", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +56,6 @@ class SSHPrivateKey(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,15 +87,17 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "identity", - "created_at", - "public_key", - "location", - "is_default", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "identity", + "created_at", + "public_key", + "location", + "is_default", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,11 +106,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() # set to None if public_key (nullable) is None # and model_fields_set contains the field if self.public_key is None and "public_key" in self.model_fields_set: - _dict['public_key'] = None + _dict["public_key"] = None return _dict @@ -108,15 +123,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "created_at": obj.get("created_at"), - "public_key": obj.get("public_key"), - "location": obj.get("location"), - "is_default": obj.get("is_default") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "identity": ( + Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None + ), + "created_at": obj.get("created_at"), + "public_key": obj.get("public_key"), + "location": obj.get("location"), + "is_default": obj.get("is_default"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_private_key_create.py b/saturn_api/models/ssh_private_key_create.py index 7cfdb9f..4362dec 100644 --- a/saturn_api/models/ssh_private_key_create.py +++ b/saturn_api/models/ssh_private_key_create.py @@ -1,37 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity_reference import IdentityReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity_reference import IdentityReference + + class SSHPrivateKeyCreate(BaseModel): """ SSHPrivateKeyCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the SSH private key.") - identity: Optional[IdentityReference] = Field(default=None, description="Reference to the identity that owns the SSH private key.") + identity: Optional[IdentityReference] = Field( + default=None, description="Reference to the identity that owns the SSH private key." + ) value: Optional[StrictStr] = Field(default=None, description="Value of the SSH private key.") - location: Optional[StrictStr] = Field(default=None, description="Path to the SSH private key in resources.") - is_default: Optional[StrictBool] = Field(default=False, description="Enable SSH private key to be used for any external repositories that do not specify a key.") + location: Optional[StrictStr] = Field( + default=None, description="Path to the SSH private key in resources." + ) + is_default: Optional[StrictBool] = Field( + default=False, + description="Enable SSH private key to be used for any external repositories that do not specify a key.", + ) __properties: ClassVar[List[str]] = ["name", "identity", "value", "location", "is_default"] model_config = ConfigDict( @@ -40,7 +49,6 @@ class SSHPrivateKeyCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() return _dict @classmethod @@ -87,13 +94,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "value": obj.get("value"), - "location": obj.get("location"), - "is_default": obj.get("is_default") if obj.get("is_default") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "identity": ( + IdentityReference.from_dict(obj["identity"]) + if obj.get("identity") is not None + else None + ), + "value": obj.get("value"), + "location": obj.get("location"), + "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, + } + ) return _obj - - diff --git a/saturn_api/models/ssh_private_key_list.py b/saturn_api/models/ssh_private_key_list.py index 4f68799..fb00cdd 100644 --- a/saturn_api/models/ssh_private_key_list.py +++ b/saturn_api/models/ssh_private_key_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.ssh_private_key import SSHPrivateKey -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.ssh_private_key import SSHPrivateKey + + class SSHPrivateKeyList(BaseModel): """ SSHPrivateKeyList - """ # noqa: E501 + """ # noqa: E501 + ssh_private_keys: List[SSHPrivateKey] = Field(description="List of SSH private keys.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class SSHPrivateKeyList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "ssh_private_keys", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "ssh_private_keys", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_ssh_private_keys in self.ssh_private_keys: if _item_ssh_private_keys: _items.append(_item_ssh_private_keys.to_dict()) - _dict['ssh_private_keys'] = _items + _dict["ssh_private_keys"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "ssh_private_keys": [SSHPrivateKey.from_dict(_item) for _item in obj["ssh_private_keys"]] if obj.get("ssh_private_keys") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "ssh_private_keys": ( + [SSHPrivateKey.from_dict(_item) for _item in obj["ssh_private_keys"]] + if obj.get("ssh_private_keys") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_private_key_partial.py b/saturn_api/models/ssh_private_key_partial.py index 9c92614..b7bdbcf 100644 --- a/saturn_api/models/ssh_private_key_partial.py +++ b/saturn_api/models/ssh_private_key_partial.py @@ -1,39 +1,50 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.identity import Identity -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity import Identity + + class SSHPrivateKeyPartial(BaseModel): """ SSHPrivateKeyPartial - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the SSH private key.") name: StrictStr = Field(description="Name of the SSH private key.") identity: Identity = Field(description="Identity that owns the SSH private key.") created_at: StrictStr = Field(description="Creation timestamp.") location: StrictStr = Field(description="Path to the SSH private key in resources.") - is_default: StrictBool = Field(description="Enable SSH private key to be used for any external repositories that do not specify a key.") - __properties: ClassVar[List[str]] = ["id", "name", "identity", "created_at", "location", "is_default"] + is_default: StrictBool = Field( + description="Enable SSH private key to be used for any external repositories that do not specify a key." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "identity", + "created_at", + "location", + "is_default", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +52,6 @@ class SSHPrivateKeyPartial(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,14 +82,16 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "identity", - "created_at", - "location", - "is_default", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "identity", + "created_at", + "location", + "is_default", + ] + ) _dict = self.model_dump( by_alias=True, @@ -88,7 +100,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() return _dict @classmethod @@ -100,14 +112,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "created_at": obj.get("created_at"), - "location": obj.get("location"), - "is_default": obj.get("is_default") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "identity": ( + Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None + ), + "created_at": obj.get("created_at"), + "location": obj.get("location"), + "is_default": obj.get("is_default"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_private_key_update.py b/saturn_api/models/ssh_private_key_update.py index 3a852a2..cfd59f1 100644 --- a/saturn_api/models/ssh_private_key_update.py +++ b/saturn_api/models/ssh_private_key_update.py @@ -1,35 +1,41 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class SSHPrivateKeyUpdate(BaseModel): """ SSHPrivateKeyUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the SSH private key.") value: Optional[StrictStr] = Field(default=None, description="Value of the SSH private key.") - location: Optional[StrictStr] = Field(default=None, description="Path to the SSH private key in resources.") - is_default: Optional[StrictBool] = Field(default=None, description="Enable SSH private key to be used for any external repositories that do not specify a key.") + location: Optional[StrictStr] = Field( + default=None, description="Path to the SSH private key in resources." + ) + is_default: Optional[StrictBool] = Field( + default=None, + description="Enable SSH private key to be used for any external repositories that do not specify a key.", + ) __properties: ClassVar[List[str]] = ["name", "value", "location", "is_default"] model_config = ConfigDict( @@ -38,7 +44,6 @@ class SSHPrivateKeyUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if value (nullable) is None # and model_fields_set contains the field if self.value is None and "value" in self.model_fields_set: - _dict['value'] = None + _dict["value"] = None return _dict @@ -87,12 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "value": obj.get("value"), - "location": obj.get("location"), - "is_default": obj.get("is_default") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "value": obj.get("value"), + "location": obj.get("location"), + "is_default": obj.get("is_default"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_public_key.py b/saturn_api/models/ssh_public_key.py index d4d984e..9cd17d4 100644 --- a/saturn_api/models/ssh_public_key.py +++ b/saturn_api/models/ssh_public_key.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.identity import Identity -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity import Identity + + class SSHPublicKey(BaseModel): """ SSHPublicKey - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the SSH public key.") name: StrictStr = Field(description="Name of the SSH public key.") identity: Identity = Field(description="Identity that owns the SSH public key.") @@ -39,7 +41,6 @@ class SSHPublicKey(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,12 +69,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "identity", - "created_at", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "identity", + "created_at", + ] + ) _dict = self.model_dump( by_alias=True, @@ -82,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() return _dict @classmethod @@ -94,12 +97,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "created_at": obj.get("created_at") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "identity": ( + Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None + ), + "created_at": obj.get("created_at"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_public_key_create.py b/saturn_api/models/ssh_public_key_create.py index 73c441e..85ac0e6 100644 --- a/saturn_api/models/ssh_public_key_create.py +++ b/saturn_api/models/ssh_public_key_create.py @@ -1,34 +1,38 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity_reference import IdentityReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity_reference import IdentityReference + + class SSHPublicKeyCreate(BaseModel): """ SSHPublicKeyCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the SSH public key.") - identity: Optional[IdentityReference] = Field(default=None, description="Refence to the identity that owns the SSH public key.") + identity: Optional[IdentityReference] = Field( + default=None, description="Refence to the identity that owns the SSH public key." + ) value: StrictStr = Field(description="Value of the SSH public key.") __properties: ClassVar[List[str]] = ["name", "identity", "value"] @@ -38,7 +42,6 @@ class SSHPublicKeyCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() return _dict @classmethod @@ -85,11 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "identity": ( + IdentityReference.from_dict(obj["identity"]) + if obj.get("identity") is not None + else None + ), + "value": obj.get("value"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_public_key_list.py b/saturn_api/models/ssh_public_key_list.py index 026f0e2..b42fd19 100644 --- a/saturn_api/models/ssh_public_key_list.py +++ b/saturn_api/models/ssh_public_key_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.ssh_public_key import SSHPublicKey -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.ssh_public_key import SSHPublicKey + + class SSHPublicKeyList(BaseModel): """ SSHPublicKeyList - """ # noqa: E501 + """ # noqa: E501 + ssh_public_keys: List[SSHPublicKey] = Field(description="List of SSH public keys.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class SSHPublicKeyList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "ssh_public_keys", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "ssh_public_keys", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_ssh_public_keys in self.ssh_public_keys: if _item_ssh_public_keys: _items.append(_item_ssh_public_keys.to_dict()) - _dict['ssh_public_keys'] = _items + _dict["ssh_public_keys"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "ssh_public_keys": [SSHPublicKey.from_dict(_item) for _item in obj["ssh_public_keys"]] if obj.get("ssh_public_keys") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "ssh_public_keys": ( + [SSHPublicKey.from_dict(_item) for _item in obj["ssh_public_keys"]] + if obj.get("ssh_public_keys") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/ssh_public_key_update.py b/saturn_api/models/ssh_public_key_update.py index ceeabc7..7b63ae5 100644 --- a/saturn_api/models/ssh_public_key_update.py +++ b/saturn_api/models/ssh_public_key_update.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class SSHPublicKeyUpdate(BaseModel): """ SSHPublicKeyUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the SSH public key.") value: Optional[StrictStr] = Field(default=None, description="Value of the SSH public key.") __properties: ClassVar[List[str]] = ["name", "value"] @@ -36,7 +37,6 @@ class SSHPublicKeyUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "value": obj.get("value") - }) + _obj = cls.model_validate({"name": obj.get("name"), "value": obj.get("value")}) return _obj - - diff --git a/saturn_api/models/stats.py b/saturn_api/models/stats.py index 69d1b99..6c5e120 100644 --- a/saturn_api/models/stats.py +++ b/saturn_api/models/stats.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union -from typing import Literal, Optional, Set from typing_extensions import Self + class Stats(BaseModel): """ Stats - """ # noqa: E501 + """ # noqa: E501 + avg: Union[StrictFloat, StrictInt] = Field(description="Average value over the query range.") min: Union[StrictFloat, StrictInt] = Field(description="Minimum value over the query range.") max: Union[StrictFloat, StrictInt] = Field(description="Maximum value over the query range.") @@ -38,7 +39,6 @@ class Stats(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "avg", - "min", - "max", - "last", - ]) + excluded_fields: Set[str] = set( + [ + "avg", + "min", + "max", + "last", + ] + ) _dict = self.model_dump( by_alias=True, @@ -90,12 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "avg": obj.get("avg"), - "min": obj.get("min"), - "max": obj.get("max"), - "last": obj.get("last") - }) + _obj = cls.model_validate( + { + "avg": obj.get("avg"), + "min": obj.get("min"), + "max": obj.get("max"), + "last": obj.get("last"), + } + ) return _obj - - diff --git a/saturn_api/models/usage_limits.py b/saturn_api/models/usage_limits.py index ca40262..a7b3c22 100644 --- a/saturn_api/models/usage_limits.py +++ b/saturn_api/models/usage_limits.py @@ -1,49 +1,85 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class UsageLimits(BaseModel): """ UsageLimits - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the usage limit.") org_id: StrictStr = Field(description="Org ID that the usage limit belongs to.") created_at: datetime = Field(description="Creation timestamp.") name: StrictStr = Field(description="Name of the usage limit.") is_default: StrictBool = Field(description="Default usage limit for the org.") - instance_sizes: Optional[List[StrictStr]] = Field(description="Allowed instance sizes. Null if no limits.") - resource_types: Optional[List[StrictStr]] = Field(description="Allowed resource types. Null if no limits.") - num_instances: Optional[StrictInt] = Field(description="Maximum number of active instances. Null if no limits.") - auto_shutoff: Optional[StrictInt] = Field(description="Maximum allowed auto-shutoff. Null if no limits.") - storage_in_gb: Optional[StrictInt] = Field(description="Total allowed storage in GiB. Null if no limits.") - num_shared_folders: Optional[StrictInt] = Field(description="Maximum number of shared folders. Null if no limits.") - object_storage_bytes: Optional[StrictInt] = Field(description="Maximum allowed object storage bytes. Null if no limits.") - object_storage_count: Optional[StrictInt] = Field(description="Maximum number of object storage files. Null if no limits.") + instance_sizes: Optional[List[StrictStr]] = Field( + description="Allowed instance sizes. Null if no limits." + ) + resource_types: Optional[List[StrictStr]] = Field( + description="Allowed resource types. Null if no limits." + ) + num_instances: Optional[StrictInt] = Field( + description="Maximum number of active instances. Null if no limits." + ) + auto_shutoff: Optional[StrictInt] = Field( + description="Maximum allowed auto-shutoff. Null if no limits." + ) + storage_in_gb: Optional[StrictInt] = Field( + description="Total allowed storage in GiB. Null if no limits." + ) + num_shared_folders: Optional[StrictInt] = Field( + description="Maximum number of shared folders. Null if no limits." + ) + object_storage_bytes: Optional[StrictInt] = Field( + description="Maximum allowed object storage bytes. Null if no limits." + ) + object_storage_count: Optional[StrictInt] = Field( + description="Maximum number of object storage files. Null if no limits." + ) hours_per_day: Optional[StrictInt] = Field(description="Free compute hours per day.") hours_per_month: Optional[StrictInt] = Field(description="Free compute hours per month.") - hours_forever: Optional[StrictInt] = Field(description="Free compute hours forever (one-time grant).") - __properties: ClassVar[List[str]] = ["id", "org_id", "created_at", "name", "is_default", "instance_sizes", "resource_types", "num_instances", "auto_shutoff", "storage_in_gb", "num_shared_folders", "object_storage_bytes", "object_storage_count", "hours_per_day", "hours_per_month", "hours_forever"] + hours_forever: Optional[StrictInt] = Field( + description="Free compute hours forever (one-time grant)." + ) + __properties: ClassVar[List[str]] = [ + "id", + "org_id", + "created_at", + "name", + "is_default", + "instance_sizes", + "resource_types", + "num_instances", + "auto_shutoff", + "storage_in_gb", + "num_shared_folders", + "object_storage_bytes", + "object_storage_count", + "hours_per_day", + "hours_per_month", + "hours_forever", + ] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +87,6 @@ class UsageLimits(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,24 +127,26 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "org_id", - "created_at", - "name", - "is_default", - "instance_sizes", - "resource_types", - "num_instances", - "auto_shutoff", - "storage_in_gb", - "num_shared_folders", - "object_storage_bytes", - "object_storage_count", - "hours_per_day", - "hours_per_month", - "hours_forever", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "org_id", + "created_at", + "name", + "is_default", + "instance_sizes", + "resource_types", + "num_instances", + "auto_shutoff", + "storage_in_gb", + "num_shared_folders", + "object_storage_bytes", + "object_storage_count", + "hours_per_day", + "hours_per_month", + "hours_forever", + ] + ) _dict = self.model_dump( by_alias=True, @@ -119,57 +156,57 @@ def to_dict(self) -> Dict[str, Any]: # set to None if instance_sizes (nullable) is None # and model_fields_set contains the field if self.instance_sizes is None and "instance_sizes" in self.model_fields_set: - _dict['instance_sizes'] = None + _dict["instance_sizes"] = None # set to None if resource_types (nullable) is None # and model_fields_set contains the field if self.resource_types is None and "resource_types" in self.model_fields_set: - _dict['resource_types'] = None + _dict["resource_types"] = None # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: - _dict['num_instances'] = None + _dict["num_instances"] = None # set to None if auto_shutoff (nullable) is None # and model_fields_set contains the field if self.auto_shutoff is None and "auto_shutoff" in self.model_fields_set: - _dict['auto_shutoff'] = None + _dict["auto_shutoff"] = None # set to None if storage_in_gb (nullable) is None # and model_fields_set contains the field if self.storage_in_gb is None and "storage_in_gb" in self.model_fields_set: - _dict['storage_in_gb'] = None + _dict["storage_in_gb"] = None # set to None if num_shared_folders (nullable) is None # and model_fields_set contains the field if self.num_shared_folders is None and "num_shared_folders" in self.model_fields_set: - _dict['num_shared_folders'] = None + _dict["num_shared_folders"] = None # set to None if object_storage_bytes (nullable) is None # and model_fields_set contains the field if self.object_storage_bytes is None and "object_storage_bytes" in self.model_fields_set: - _dict['object_storage_bytes'] = None + _dict["object_storage_bytes"] = None # set to None if object_storage_count (nullable) is None # and model_fields_set contains the field if self.object_storage_count is None and "object_storage_count" in self.model_fields_set: - _dict['object_storage_count'] = None + _dict["object_storage_count"] = None # set to None if hours_per_day (nullable) is None # and model_fields_set contains the field if self.hours_per_day is None and "hours_per_day" in self.model_fields_set: - _dict['hours_per_day'] = None + _dict["hours_per_day"] = None # set to None if hours_per_month (nullable) is None # and model_fields_set contains the field if self.hours_per_month is None and "hours_per_month" in self.model_fields_set: - _dict['hours_per_month'] = None + _dict["hours_per_month"] = None # set to None if hours_forever (nullable) is None # and model_fields_set contains the field if self.hours_forever is None and "hours_forever" in self.model_fields_set: - _dict['hours_forever'] = None + _dict["hours_forever"] = None return _dict @@ -182,24 +219,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "org_id": obj.get("org_id"), - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "is_default": obj.get("is_default"), - "instance_sizes": obj.get("instance_sizes"), - "resource_types": obj.get("resource_types"), - "num_instances": obj.get("num_instances"), - "auto_shutoff": obj.get("auto_shutoff"), - "storage_in_gb": obj.get("storage_in_gb"), - "num_shared_folders": obj.get("num_shared_folders"), - "object_storage_bytes": obj.get("object_storage_bytes"), - "object_storage_count": obj.get("object_storage_count"), - "hours_per_day": obj.get("hours_per_day"), - "hours_per_month": obj.get("hours_per_month"), - "hours_forever": obj.get("hours_forever") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "created_at": obj.get("created_at"), + "name": obj.get("name"), + "is_default": obj.get("is_default"), + "instance_sizes": obj.get("instance_sizes"), + "resource_types": obj.get("resource_types"), + "num_instances": obj.get("num_instances"), + "auto_shutoff": obj.get("auto_shutoff"), + "storage_in_gb": obj.get("storage_in_gb"), + "num_shared_folders": obj.get("num_shared_folders"), + "object_storage_bytes": obj.get("object_storage_bytes"), + "object_storage_count": obj.get("object_storage_count"), + "hours_per_day": obj.get("hours_per_day"), + "hours_per_month": obj.get("hours_per_month"), + "hours_forever": obj.get("hours_forever"), + } + ) return _obj - - diff --git a/saturn_api/models/usage_limits_create.py b/saturn_api/models/usage_limits_create.py index 2334a5f..ecc2b31 100644 --- a/saturn_api/models/usage_limits_create.py +++ b/saturn_api/models/usage_limits_create.py @@ -1,47 +1,88 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class UsageLimitsCreate(BaseModel): """ UsageLimitsCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the usage limit.") - org_id: Optional[StrictStr] = Field(default=None, description="Org ID that the usage limit belongs to.") - is_default: Optional[StrictBool] = Field(default=False, description="Default usage limit for the org.") - instance_sizes: Optional[List[StrictStr]] = Field(default=None, description="Allowed instance sizes. Null if no limits.") - resource_types: Optional[List[StrictStr]] = Field(default=None, description="Allowed resource types. Null if no limits.") - num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of active instances. Null if no limits.") - auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed auto-shutoff. Null if no limits.") - storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Total allowed storage in GiB. Null if no limits.") - num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of shared folders. Null if no limits.") - object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed object storage bytes. Null if no limits.") - object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of object storage files. Null if no limits.") - hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per day.") - hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per month.") - hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours forever (one-time grant).") - __properties: ClassVar[List[str]] = ["name", "org_id", "is_default", "instance_sizes", "resource_types", "num_instances", "auto_shutoff", "storage_in_gb", "num_shared_folders", "object_storage_bytes", "object_storage_count", "hours_per_day", "hours_per_month", "hours_forever"] + org_id: Optional[StrictStr] = Field( + default=None, description="Org ID that the usage limit belongs to." + ) + is_default: Optional[StrictBool] = Field( + default=False, description="Default usage limit for the org." + ) + instance_sizes: Optional[List[StrictStr]] = Field( + default=None, description="Allowed instance sizes. Null if no limits." + ) + resource_types: Optional[List[StrictStr]] = Field( + default=None, description="Allowed resource types. Null if no limits." + ) + num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of active instances. Null if no limits." + ) + auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum allowed auto-shutoff. Null if no limits." + ) + storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Total allowed storage in GiB. Null if no limits." + ) + num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of shared folders. Null if no limits." + ) + object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum allowed object storage bytes. Null if no limits." + ) + object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of object storage files. Null if no limits." + ) + hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Free compute hours per day." + ) + hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Free compute hours per month." + ) + hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Free compute hours forever (one-time grant)." + ) + __properties: ClassVar[List[str]] = [ + "name", + "org_id", + "is_default", + "instance_sizes", + "resource_types", + "num_instances", + "auto_shutoff", + "storage_in_gb", + "num_shared_folders", + "object_storage_bytes", + "object_storage_count", + "hours_per_day", + "hours_per_month", + "hours_forever", + ] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +90,6 @@ class UsageLimitsCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,8 +114,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,57 +124,57 @@ def to_dict(self) -> Dict[str, Any]: # set to None if instance_sizes (nullable) is None # and model_fields_set contains the field if self.instance_sizes is None and "instance_sizes" in self.model_fields_set: - _dict['instance_sizes'] = None + _dict["instance_sizes"] = None # set to None if resource_types (nullable) is None # and model_fields_set contains the field if self.resource_types is None and "resource_types" in self.model_fields_set: - _dict['resource_types'] = None + _dict["resource_types"] = None # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: - _dict['num_instances'] = None + _dict["num_instances"] = None # set to None if auto_shutoff (nullable) is None # and model_fields_set contains the field if self.auto_shutoff is None and "auto_shutoff" in self.model_fields_set: - _dict['auto_shutoff'] = None + _dict["auto_shutoff"] = None # set to None if storage_in_gb (nullable) is None # and model_fields_set contains the field if self.storage_in_gb is None and "storage_in_gb" in self.model_fields_set: - _dict['storage_in_gb'] = None + _dict["storage_in_gb"] = None # set to None if num_shared_folders (nullable) is None # and model_fields_set contains the field if self.num_shared_folders is None and "num_shared_folders" in self.model_fields_set: - _dict['num_shared_folders'] = None + _dict["num_shared_folders"] = None # set to None if object_storage_bytes (nullable) is None # and model_fields_set contains the field if self.object_storage_bytes is None and "object_storage_bytes" in self.model_fields_set: - _dict['object_storage_bytes'] = None + _dict["object_storage_bytes"] = None # set to None if object_storage_count (nullable) is None # and model_fields_set contains the field if self.object_storage_count is None and "object_storage_count" in self.model_fields_set: - _dict['object_storage_count'] = None + _dict["object_storage_count"] = None # set to None if hours_per_day (nullable) is None # and model_fields_set contains the field if self.hours_per_day is None and "hours_per_day" in self.model_fields_set: - _dict['hours_per_day'] = None + _dict["hours_per_day"] = None # set to None if hours_per_month (nullable) is None # and model_fields_set contains the field if self.hours_per_month is None and "hours_per_month" in self.model_fields_set: - _dict['hours_per_month'] = None + _dict["hours_per_month"] = None # set to None if hours_forever (nullable) is None # and model_fields_set contains the field if self.hours_forever is None and "hours_forever" in self.model_fields_set: - _dict['hours_forever'] = None + _dict["hours_forever"] = None return _dict @@ -148,22 +187,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "org_id": obj.get("org_id"), - "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, - "instance_sizes": obj.get("instance_sizes"), - "resource_types": obj.get("resource_types"), - "num_instances": obj.get("num_instances"), - "auto_shutoff": obj.get("auto_shutoff"), - "storage_in_gb": obj.get("storage_in_gb"), - "num_shared_folders": obj.get("num_shared_folders"), - "object_storage_bytes": obj.get("object_storage_bytes"), - "object_storage_count": obj.get("object_storage_count"), - "hours_per_day": obj.get("hours_per_day"), - "hours_per_month": obj.get("hours_per_month"), - "hours_forever": obj.get("hours_forever") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "org_id": obj.get("org_id"), + "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, + "instance_sizes": obj.get("instance_sizes"), + "resource_types": obj.get("resource_types"), + "num_instances": obj.get("num_instances"), + "auto_shutoff": obj.get("auto_shutoff"), + "storage_in_gb": obj.get("storage_in_gb"), + "num_shared_folders": obj.get("num_shared_folders"), + "object_storage_bytes": obj.get("object_storage_bytes"), + "object_storage_count": obj.get("object_storage_count"), + "hours_per_day": obj.get("hours_per_day"), + "hours_per_month": obj.get("hours_per_month"), + "hours_forever": obj.get("hours_forever"), + } + ) return _obj - - diff --git a/saturn_api/models/usage_limits_list.py b/saturn_api/models/usage_limits_list.py index fc93e77..e046cc3 100644 --- a/saturn_api/models/usage_limits_list.py +++ b/saturn_api/models/usage_limits_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.usage_limits import UsageLimits -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.usage_limits import UsageLimits + + class UsageLimitsList(BaseModel): """ UsageLimitsList - """ # noqa: E501 + """ # noqa: E501 + usage_limits: List[UsageLimits] = Field(description="List of usage limits.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class UsageLimitsList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "usage_limits", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "usage_limits", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_usage_limits in self.usage_limits: if _item_usage_limits: _items.append(_item_usage_limits.to_dict()) - _dict['usage_limits'] = _items + _dict["usage_limits"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "usage_limits": [UsageLimits.from_dict(_item) for _item in obj["usage_limits"]] if obj.get("usage_limits") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "usage_limits": ( + [UsageLimits.from_dict(_item) for _item in obj["usage_limits"]] + if obj.get("usage_limits") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/usage_limits_update.py b/saturn_api/models/usage_limits_update.py index f88d698..8c04dd1 100644 --- a/saturn_api/models/usage_limits_update.py +++ b/saturn_api/models/usage_limits_update.py @@ -1,46 +1,84 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class UsageLimitsUpdate(BaseModel): """ UsageLimitsUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the usage limit.") - is_default: Optional[StrictBool] = Field(default=None, description="Default usage limit for the org.") - instance_sizes: Optional[List[StrictStr]] = Field(default=None, description="Allowed instance sizes. Null if no limits.") - resource_types: Optional[List[StrictStr]] = Field(default=None, description="Allowed resource types. Null if no limits.") - num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of active instances. Null if no limits.") - auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed auto-shutoff. Null if no limits.") - storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Total allowed storage in GiB. Null if no limits.") - num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of shared folders. Null if no limits.") - object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum allowed object storage bytes. Null if no limits.") - object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of object storage files. Null if no limits.") - hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per day.") - hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours per month.") - hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Free compute hours forever (one-time grant).") - __properties: ClassVar[List[str]] = ["name", "is_default", "instance_sizes", "resource_types", "num_instances", "auto_shutoff", "storage_in_gb", "num_shared_folders", "object_storage_bytes", "object_storage_count", "hours_per_day", "hours_per_month", "hours_forever"] + is_default: Optional[StrictBool] = Field( + default=None, description="Default usage limit for the org." + ) + instance_sizes: Optional[List[StrictStr]] = Field( + default=None, description="Allowed instance sizes. Null if no limits." + ) + resource_types: Optional[List[StrictStr]] = Field( + default=None, description="Allowed resource types. Null if no limits." + ) + num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of active instances. Null if no limits." + ) + auto_shutoff: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum allowed auto-shutoff. Null if no limits." + ) + storage_in_gb: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Total allowed storage in GiB. Null if no limits." + ) + num_shared_folders: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of shared folders. Null if no limits." + ) + object_storage_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum allowed object storage bytes. Null if no limits." + ) + object_storage_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Maximum number of object storage files. Null if no limits." + ) + hours_per_day: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Free compute hours per day." + ) + hours_per_month: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Free compute hours per month." + ) + hours_forever: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="Free compute hours forever (one-time grant)." + ) + __properties: ClassVar[List[str]] = [ + "name", + "is_default", + "instance_sizes", + "resource_types", + "num_instances", + "auto_shutoff", + "storage_in_gb", + "num_shared_folders", + "object_storage_bytes", + "object_storage_count", + "hours_per_day", + "hours_per_month", + "hours_forever", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +86,6 @@ class UsageLimitsUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +110,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,57 +120,57 @@ def to_dict(self) -> Dict[str, Any]: # set to None if instance_sizes (nullable) is None # and model_fields_set contains the field if self.instance_sizes is None and "instance_sizes" in self.model_fields_set: - _dict['instance_sizes'] = None + _dict["instance_sizes"] = None # set to None if resource_types (nullable) is None # and model_fields_set contains the field if self.resource_types is None and "resource_types" in self.model_fields_set: - _dict['resource_types'] = None + _dict["resource_types"] = None # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: - _dict['num_instances'] = None + _dict["num_instances"] = None # set to None if auto_shutoff (nullable) is None # and model_fields_set contains the field if self.auto_shutoff is None and "auto_shutoff" in self.model_fields_set: - _dict['auto_shutoff'] = None + _dict["auto_shutoff"] = None # set to None if storage_in_gb (nullable) is None # and model_fields_set contains the field if self.storage_in_gb is None and "storage_in_gb" in self.model_fields_set: - _dict['storage_in_gb'] = None + _dict["storage_in_gb"] = None # set to None if num_shared_folders (nullable) is None # and model_fields_set contains the field if self.num_shared_folders is None and "num_shared_folders" in self.model_fields_set: - _dict['num_shared_folders'] = None + _dict["num_shared_folders"] = None # set to None if object_storage_bytes (nullable) is None # and model_fields_set contains the field if self.object_storage_bytes is None and "object_storage_bytes" in self.model_fields_set: - _dict['object_storage_bytes'] = None + _dict["object_storage_bytes"] = None # set to None if object_storage_count (nullable) is None # and model_fields_set contains the field if self.object_storage_count is None and "object_storage_count" in self.model_fields_set: - _dict['object_storage_count'] = None + _dict["object_storage_count"] = None # set to None if hours_per_day (nullable) is None # and model_fields_set contains the field if self.hours_per_day is None and "hours_per_day" in self.model_fields_set: - _dict['hours_per_day'] = None + _dict["hours_per_day"] = None # set to None if hours_per_month (nullable) is None # and model_fields_set contains the field if self.hours_per_month is None and "hours_per_month" in self.model_fields_set: - _dict['hours_per_month'] = None + _dict["hours_per_month"] = None # set to None if hours_forever (nullable) is None # and model_fields_set contains the field if self.hours_forever is None and "hours_forever" in self.model_fields_set: - _dict['hours_forever'] = None + _dict["hours_forever"] = None return _dict @@ -147,21 +183,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "is_default": obj.get("is_default"), - "instance_sizes": obj.get("instance_sizes"), - "resource_types": obj.get("resource_types"), - "num_instances": obj.get("num_instances"), - "auto_shutoff": obj.get("auto_shutoff"), - "storage_in_gb": obj.get("storage_in_gb"), - "num_shared_folders": obj.get("num_shared_folders"), - "object_storage_bytes": obj.get("object_storage_bytes"), - "object_storage_count": obj.get("object_storage_count"), - "hours_per_day": obj.get("hours_per_day"), - "hours_per_month": obj.get("hours_per_month"), - "hours_forever": obj.get("hours_forever") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "is_default": obj.get("is_default"), + "instance_sizes": obj.get("instance_sizes"), + "resource_types": obj.get("resource_types"), + "num_instances": obj.get("num_instances"), + "auto_shutoff": obj.get("auto_shutoff"), + "storage_in_gb": obj.get("storage_in_gb"), + "num_shared_folders": obj.get("num_shared_folders"), + "object_storage_bytes": obj.get("object_storage_bytes"), + "object_storage_count": obj.get("object_storage_count"), + "hours_per_day": obj.get("hours_per_day"), + "hours_per_month": obj.get("hours_per_month"), + "hours_forever": obj.get("hours_forever"), + } + ) return _obj - - diff --git a/saturn_api/models/usage_owner.py b/saturn_api/models/usage_owner.py index 8aacc37..7d49319 100644 --- a/saturn_api/models/usage_owner.py +++ b/saturn_api/models/usage_owner.py @@ -1,32 +1,35 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class UsageOwner(BaseModel): """ UsageOwner - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="Name of the identity of the usage record.") + """ # noqa: E501 + + name: Optional[StrictStr] = Field( + default=None, description="Name of the identity of the usage record." + ) identity_type: StrictStr = Field(description="Type of the identity of the usage record.") user_id: Optional[StrictStr] = Field(default=None, description="User ID of the usage record") group_id: Optional[StrictStr] = Field(default=None, description="Group ID of the usage record.") @@ -38,7 +41,6 @@ class UsageOwner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "user_id", - "group_id", - ]) + excluded_fields: Set[str] = set( + [ + "user_id", + "group_id", + ] + ) _dict = self.model_dump( by_alias=True, @@ -78,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if name (nullable) is None # and model_fields_set contains the field if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None + _dict["name"] = None return _dict @@ -91,12 +95,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "identity_type": obj.get("identity_type"), - "user_id": obj.get("user_id"), - "group_id": obj.get("group_id") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "identity_type": obj.get("identity_type"), + "user_id": obj.get("user_id"), + "group_id": obj.get("group_id"), + } + ) return _obj - - diff --git a/saturn_api/models/user.py b/saturn_api/models/user.py index b373c14..edf370c 100644 --- a/saturn_api/models/user.py +++ b/saturn_api/models/user.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class User(BaseModel): """ User - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the user.") avatar_url: StrictStr = Field(description="Avatar URL of the user.") username: StrictStr = Field(description="Name of the user.") @@ -37,7 +38,6 @@ class User(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,11 +65,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "avatar_url", - "username", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "avatar_url", + "username", + ] + ) _dict = self.model_dump( by_alias=True, @@ -87,11 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "avatar_url": obj.get("avatar_url"), - "username": obj.get("username") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "avatar_url": obj.get("avatar_url"), + "username": obj.get("username"), + } + ) return _obj - - diff --git a/saturn_api/models/user_admin_create.py b/saturn_api/models/user_admin_create.py index c794828..82b5b29 100644 --- a/saturn_api/models/user_admin_create.py +++ b/saturn_api/models/user_admin_create.py @@ -1,40 +1,58 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class UserAdminCreate(BaseModel): """ UserAdminCreate - """ # noqa: E501 + """ # noqa: E501 + username: StrictStr = Field(description="Name of the user.") email: StrictStr = Field(description="Email of the user.") full_name: Optional[StrictStr] = Field(default=None, description="Full name of the user.") - admin: Optional[StrictBool] = Field(default=False, description="Enable user to take privileged actions in the API.") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the user in the primary org.") - send_reset_email: Optional[StrictBool] = Field(default=True, description="Send password reset to the user's email on create.") + admin: Optional[StrictBool] = Field( + default=False, description="Enable user to take privileged actions in the API." + ) + limits_id: Optional[StrictStr] = Field( + default=None, description="Usage limits ID applied to the user in the primary org." + ) + send_reset_email: Optional[StrictBool] = Field( + default=True, description="Send password reset to the user's email on create." + ) locked: Optional[StrictBool] = Field(default=False, description="Lock the user.") - prevent_duplicate_emails: Optional[StrictBool] = Field(default=False, description="Prevent creating user with duplicate email.") - __properties: ClassVar[List[str]] = ["username", "email", "full_name", "admin", "limits_id", "send_reset_email", "locked", "prevent_duplicate_emails"] + prevent_duplicate_emails: Optional[StrictBool] = Field( + default=False, description="Prevent creating user with duplicate email." + ) + __properties: ClassVar[List[str]] = [ + "username", + "email", + "full_name", + "admin", + "limits_id", + "send_reset_email", + "locked", + "prevent_duplicate_emails", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +60,6 @@ class UserAdminCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None return _dict @@ -91,16 +107,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "username": obj.get("username"), - "email": obj.get("email"), - "full_name": obj.get("full_name"), - "admin": obj.get("admin") if obj.get("admin") is not None else False, - "limits_id": obj.get("limits_id"), - "send_reset_email": obj.get("send_reset_email") if obj.get("send_reset_email") is not None else True, - "locked": obj.get("locked") if obj.get("locked") is not None else False, - "prevent_duplicate_emails": obj.get("prevent_duplicate_emails") if obj.get("prevent_duplicate_emails") is not None else False - }) + _obj = cls.model_validate( + { + "username": obj.get("username"), + "email": obj.get("email"), + "full_name": obj.get("full_name"), + "admin": obj.get("admin") if obj.get("admin") is not None else False, + "limits_id": obj.get("limits_id"), + "send_reset_email": ( + obj.get("send_reset_email") if obj.get("send_reset_email") is not None else True + ), + "locked": obj.get("locked") if obj.get("locked") is not None else False, + "prevent_duplicate_emails": ( + obj.get("prevent_duplicate_emails") + if obj.get("prevent_duplicate_emails") is not None + else False + ), + } + ) return _obj - - diff --git a/saturn_api/models/user_detailed.py b/saturn_api/models/user_detailed.py index ca4acc1..40ea3bd 100644 --- a/saturn_api/models/user_detailed.py +++ b/saturn_api/models/user_detailed.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class UserDetailed(BaseModel): """ UserDetailed - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the user.") avatar_url: StrictStr = Field(description="Avatar URL of the user.") username: StrictStr = Field(description="Name of the user.") @@ -37,7 +38,19 @@ class UserDetailed(BaseModel): locked_reason: StrictStr = Field(description="Reason the user is locked.") is_multiple_ssh_keys: StrictBool = Field(description="Enable multiple SSH keys.") active: StrictBool = Field(description="True if user is active.") - __properties: ClassVar[List[str]] = ["id", "avatar_url", "username", "created_at", "full_name", "email", "admin", "locked", "locked_reason", "is_multiple_ssh_keys", "active"] + __properties: ClassVar[List[str]] = [ + "id", + "avatar_url", + "username", + "created_at", + "full_name", + "email", + "admin", + "locked", + "locked_reason", + "is_multiple_ssh_keys", + "active", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +58,6 @@ class UserDetailed(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,19 +93,21 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "avatar_url", - "username", - "created_at", - "full_name", - "email", - "admin", - "locked", - "locked_reason", - "is_multiple_ssh_keys", - "active", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "avatar_url", + "username", + "created_at", + "full_name", + "email", + "admin", + "locked", + "locked_reason", + "is_multiple_ssh_keys", + "active", + ] + ) _dict = self.model_dump( by_alias=True, @@ -111,19 +125,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "avatar_url": obj.get("avatar_url"), - "username": obj.get("username"), - "created_at": obj.get("created_at"), - "full_name": obj.get("full_name"), - "email": obj.get("email"), - "admin": obj.get("admin"), - "locked": obj.get("locked"), - "locked_reason": obj.get("locked_reason"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "active": obj.get("active") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "avatar_url": obj.get("avatar_url"), + "username": obj.get("username"), + "created_at": obj.get("created_at"), + "full_name": obj.get("full_name"), + "email": obj.get("email"), + "admin": obj.get("admin"), + "locked": obj.get("locked"), + "locked_reason": obj.get("locked_reason"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "active": obj.get("active"), + } + ) return _obj - - diff --git a/saturn_api/models/user_detailed_list.py b/saturn_api/models/user_detailed_list.py index 43bedb2..b054b1e 100644 --- a/saturn_api/models/user_detailed_list.py +++ b/saturn_api/models/user_detailed_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.user_detailed import UserDetailed -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.user_detailed import UserDetailed + + class UserDetailedList(BaseModel): """ UserDetailedList - """ # noqa: E501 + """ # noqa: E501 + users: List[UserDetailed] = Field(description="List of detailed users.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class UserDetailedList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "users", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "users", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_users in self.users: if _item_users: _items.append(_item_users.to_dict()) - _dict['users'] = _items + _dict["users"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "users": [UserDetailed.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "users": ( + [UserDetailed.from_dict(_item) for _item in obj["users"]] + if obj.get("users") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/user_list.py b/saturn_api/models/user_list.py index 04f6d90..98dbaa2 100644 --- a/saturn_api/models/user_list.py +++ b/saturn_api/models/user_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.user import User -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.user import User + + class UserList(BaseModel): """ UserList - """ # noqa: E501 + """ # noqa: E501 + users: List[User] = Field(description="List of users.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class UserList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,9 +65,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "users", - ]) + excluded_fields: Set[str] = set( + [ + "users", + ] + ) _dict = self.model_dump( by_alias=True, @@ -79,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_users in self.users: if _item_users: _items.append(_item_users.to_dict()) - _dict['users'] = _items + _dict["users"] = _items return _dict @classmethod @@ -91,11 +94,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "users": ( + [User.from_dict(_item) for _item in obj["users"]] + if obj.get("users") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/user_owner_list.py b/saturn_api/models/user_owner_list.py index ec17470..309cd95 100644 --- a/saturn_api/models/user_owner_list.py +++ b/saturn_api/models/user_owner_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.owner_user_detailed import OwnerUserDetailed -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_user_detailed import OwnerUserDetailed + + class UserOwnerList(BaseModel): """ UserOwnerList - """ # noqa: E501 + """ # noqa: E501 + owners: List[OwnerUserDetailed] = Field(description="List of user owners.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class UserOwnerList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "owners", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "owners", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_owners in self.owners: if _item_owners: _items.append(_item_owners.to_dict()) - _dict['owners'] = _items + _dict["owners"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "owners": [OwnerUserDetailed.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "owners": ( + [OwnerUserDetailed.from_dict(_item) for _item in obj["owners"]] + if obj.get("owners") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/user_preferences.py b/saturn_api/models/user_preferences.py index 5124be1..645654c 100644 --- a/saturn_api/models/user_preferences.py +++ b/saturn_api/models/user_preferences.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from saturn_api.models.owner_user_detailed import OwnerUserDetailed -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.owner_user_detailed import OwnerUserDetailed + + class UserPreferences(BaseModel): """ UserPreferences - """ # noqa: E501 + """ # noqa: E501 + default_org_id: StrictStr = Field(description="Default org ID for the user.") default_owner: OwnerUserDetailed = Field(description="Default owner for the user.") __properties: ClassVar[List[str]] = ["default_org_id", "default_owner"] @@ -37,7 +39,6 @@ class UserPreferences(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,10 +65,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "default_org_id", - "default_owner", - ]) + excluded_fields: Set[str] = set( + [ + "default_org_id", + "default_owner", + ] + ) _dict = self.model_dump( by_alias=True, @@ -76,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of default_owner if self.default_owner: - _dict['default_owner'] = self.default_owner.to_dict() + _dict["default_owner"] = self.default_owner.to_dict() return _dict @classmethod @@ -88,10 +91,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "default_org_id": obj.get("default_org_id"), - "default_owner": OwnerUserDetailed.from_dict(obj["default_owner"]) if obj.get("default_owner") is not None else None - }) + _obj = cls.model_validate( + { + "default_org_id": obj.get("default_org_id"), + "default_owner": ( + OwnerUserDetailed.from_dict(obj["default_owner"]) + if obj.get("default_owner") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/user_preferences_update.py b/saturn_api/models/user_preferences_update.py index 97430a2..7a73829 100644 --- a/saturn_api/models/user_preferences_update.py +++ b/saturn_api/models/user_preferences_update.py @@ -1,31 +1,32 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Literal, Optional, Set from typing_extensions import Self + class UserPreferencesUpdate(BaseModel): """ UserPreferencesUpdate - """ # noqa: E501 + """ # noqa: E501 + default_org_id: StrictStr = Field(description="Default org ID for the user.") __properties: ClassVar[List[str]] = ["default_org_id"] @@ -35,7 +36,6 @@ class UserPreferencesUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "default_org_id": obj.get("default_org_id") - }) + _obj = cls.model_validate({"default_org_id": obj.get("default_org_id")}) return _obj - - diff --git a/saturn_api/models/user_update.py b/saturn_api/models/user_update.py index ca3fc35..a9db3f9 100644 --- a/saturn_api/models/user_update.py +++ b/saturn_api/models/user_update.py @@ -1,40 +1,57 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class UserUpdate(BaseModel): """ UserUpdate - """ # noqa: E501 + """ # noqa: E501 + username: Optional[StrictStr] = Field(default=None, description="Name of the user.") full_name: Optional[StrictStr] = Field(default=None, description="Full name of the user.") email: Optional[StrictStr] = Field(default=None, description="Email of the user.") - is_multiple_ssh_keys: Optional[StrictBool] = Field(default=None, description="Enable multiple SSH keys.") + is_multiple_ssh_keys: Optional[StrictBool] = Field( + default=None, description="Enable multiple SSH keys." + ) active: Optional[StrictBool] = Field(default=None, description="True if user is active.") - admin: Optional[StrictBool] = Field(default=None, description="Enable user to take privileged actions in the API. (Admin only)") + admin: Optional[StrictBool] = Field( + default=None, description="Enable user to take privileged actions in the API. (Admin only)" + ) locked: Optional[StrictBool] = Field(default=None, description="Lock the user. (Admin only)") - limits_id: Optional[StrictStr] = Field(default=None, description="Usage limits ID applied to the user in the primary org. (Admin only)") - __properties: ClassVar[List[str]] = ["username", "full_name", "email", "is_multiple_ssh_keys", "active", "admin", "locked", "limits_id"] + limits_id: Optional[StrictStr] = Field( + default=None, + description="Usage limits ID applied to the user in the primary org. (Admin only)", + ) + __properties: ClassVar[List[str]] = [ + "username", + "full_name", + "email", + "is_multiple_ssh_keys", + "active", + "admin", + "locked", + "limits_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +59,6 @@ class UserUpdate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +83,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limits_id (nullable) is None # and model_fields_set contains the field if self.limits_id is None and "limits_id" in self.model_fields_set: - _dict['limits_id'] = None + _dict["limits_id"] = None return _dict @@ -91,16 +106,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "username": obj.get("username"), - "full_name": obj.get("full_name"), - "email": obj.get("email"), - "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), - "active": obj.get("active"), - "admin": obj.get("admin"), - "locked": obj.get("locked"), - "limits_id": obj.get("limits_id") - }) + _obj = cls.model_validate( + { + "username": obj.get("username"), + "full_name": obj.get("full_name"), + "email": obj.get("email"), + "is_multiple_ssh_keys": obj.get("is_multiple_ssh_keys"), + "active": obj.get("active"), + "admin": obj.get("admin"), + "locked": obj.get("locked"), + "limits_id": obj.get("limits_id"), + } + ) return _obj - - diff --git a/saturn_api/models/users_get200_response.py b/saturn_api/models/users_get200_response.py index d25a7cf..3c65b7f 100644 --- a/saturn_api/models/users_get200_response.py +++ b/saturn_api/models/users_get200_response.py @@ -1,36 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.user import User from saturn_api.models.user_detailed import UserDetailed -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar USERSGET200RESPONSE_ONE_OF_SCHEMAS = ["User", "UserDetailed"] T = TypeVar("T", User, UserDetailed, default=Union[User, UserDetailed]) + class UsersGet200Response(RootModel[T]): """ UsersGet200Response """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -67,5 +77,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/users_list200_response.py b/saturn_api/models/users_list200_response.py index f72605a..3c60d3f 100644 --- a/saturn_api/models/users_list200_response.py +++ b/saturn_api/models/users_list200_response.py @@ -1,36 +1,46 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any, Dict, Union + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + RootModel, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Literal, Self, TypeVar + from saturn_api.models.user_detailed_list import UserDetailedList from saturn_api.models.user_list import UserList -from pydantic import RootModel, StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self, TypeVar USERSLIST200RESPONSE_ONE_OF_SCHEMAS = ["UserDetailedList", "UserList"] T = TypeVar("T", UserDetailedList, UserList, default=Union[UserDetailedList, UserList]) + class UsersList200Response(RootModel[T]): """ UsersList200Response """ + model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), @@ -67,5 +77,3 @@ def to_dict(self) -> Dict[str, Any]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/saturn_api/models/viewer.py b/saturn_api/models/viewer.py index 3183e4d..db922cb 100644 --- a/saturn_api/models/viewer.py +++ b/saturn_api/models/viewer.py @@ -1,36 +1,40 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity import Identity -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity import Identity + + class Viewer(BaseModel): """ Viewer - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the viewer.") created_at: StrictStr = Field(description="Creation timestamp.") identity: Identity = Field(description="Identity of the viewer.") - route_id: Optional[StrictStr] = Field(description="Route ID to allow view access to. If null, all routes are granted.") + route_id: Optional[StrictStr] = Field( + description="Route ID to allow view access to. If null, all routes are granted." + ) subdomain: Optional[StrictStr] = Field(description="Subdomain of the route.") __properties: ClassVar[List[str]] = ["id", "created_at", "identity", "route_id", "subdomain"] @@ -40,7 +44,6 @@ class Viewer(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,13 +73,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "created_at", - "identity", - "route_id", - "subdomain", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "created_at", + "identity", + "route_id", + "subdomain", + ] + ) _dict = self.model_dump( by_alias=True, @@ -85,16 +90,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() # set to None if route_id (nullable) is None # and model_fields_set contains the field if self.route_id is None and "route_id" in self.model_fields_set: - _dict['route_id'] = None + _dict["route_id"] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict['subdomain'] = None + _dict["subdomain"] = None return _dict @@ -107,13 +112,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "identity": Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "route_id": obj.get("route_id"), - "subdomain": obj.get("subdomain") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "identity": ( + Identity.from_dict(obj["identity"]) if obj.get("identity") is not None else None + ), + "route_id": obj.get("route_id"), + "subdomain": obj.get("subdomain"), + } + ) return _obj - - diff --git a/saturn_api/models/viewer_create.py b/saturn_api/models/viewer_create.py index 8cb10ed..d34c736 100644 --- a/saturn_api/models/viewer_create.py +++ b/saturn_api/models/viewer_create.py @@ -1,34 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.identity_reference import IdentityReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.identity_reference import IdentityReference + + class ViewerCreate(BaseModel): """ ViewerCreate - """ # noqa: E501 + """ # noqa: E501 + identity: IdentityReference = Field(description="Reference to an identity.") - route_id: Optional[StrictStr] = Field(default=None, description="Route ID to allow view access to. If null, all routes are granted.") + route_id: Optional[StrictStr] = Field( + default=None, + description="Route ID to allow view access to. If null, all routes are granted.", + ) __properties: ClassVar[List[str]] = ["identity", "route_id"] model_config = ConfigDict( @@ -37,7 +42,6 @@ class ViewerCreate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of identity if self.identity: - _dict['identity'] = self.identity.to_dict() + _dict["identity"] = self.identity.to_dict() # set to None if route_id (nullable) is None # and model_fields_set contains the field if self.route_id is None and "route_id" in self.model_fields_set: - _dict['route_id'] = None + _dict["route_id"] = None return _dict @@ -89,10 +92,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "identity": IdentityReference.from_dict(obj["identity"]) if obj.get("identity") is not None else None, - "route_id": obj.get("route_id") - }) + _obj = cls.model_validate( + { + "identity": ( + IdentityReference.from_dict(obj["identity"]) + if obj.get("identity") is not None + else None + ), + "route_id": obj.get("route_id"), + } + ) return _obj - - diff --git a/saturn_api/models/viewer_list.py b/saturn_api/models/viewer_list.py index babfbb7..a8e642d 100644 --- a/saturn_api/models/viewer_list.py +++ b/saturn_api/models/viewer_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.viewer import Viewer -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.viewer import Viewer + + class ViewerList(BaseModel): """ ViewerList - """ # noqa: E501 + """ # noqa: E501 + viewers: List[Viewer] = Field(description="List of viewers.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class ViewerList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "viewers", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "viewers", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_viewers in self.viewers: if _item_viewers: _items.append(_item_viewers.to_dict()) - _dict['viewers'] = _items + _dict["viewers"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "viewers": [Viewer.from_dict(_item) for _item in obj["viewers"]] if obj.get("viewers") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "viewers": ( + [Viewer.from_dict(_item) for _item in obj["viewers"]] + if obj.get("viewers") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/viewer_recipe.py b/saturn_api/models/viewer_recipe.py index 1895696..679106e 100644 --- a/saturn_api/models/viewer_recipe.py +++ b/saturn_api/models/viewer_recipe.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.route_reference import RouteReference -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.route_reference import RouteReference + + class ViewerRecipe(BaseModel): """ ViewerRecipe - """ # noqa: E501 + """ # noqa: E501 + identity: StrictStr route: Optional[RouteReference] = None __properties: ClassVar[List[str]] = ["identity", "route"] @@ -37,7 +39,6 @@ class ViewerRecipe(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of route if self.route: - _dict['route'] = self.route.to_dict() + _dict["route"] = self.route.to_dict() return _dict @classmethod @@ -84,10 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "identity": obj.get("identity"), - "route": RouteReference.from_dict(obj["route"]) if obj.get("route") is not None else None - }) + _obj = cls.model_validate( + { + "identity": obj.get("identity"), + "route": ( + RouteReference.from_dict(obj["route"]) if obj.get("route") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/white_label_configuration.py b/saturn_api/models/white_label_configuration.py index 125590f..ea4296d 100644 --- a/saturn_api/models/white_label_configuration.py +++ b/saturn_api/models/white_label_configuration.py @@ -1,45 +1,69 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class WhiteLabelConfiguration(BaseModel): """ WhiteLabelConfiguration - """ # noqa: E501 + """ # noqa: E501 + enabled: StrictBool = Field(description="Enable whitelabel configuration.") brand_name: StrictStr = Field(description="Whitelabeled brand name.") - brand_short_name: Optional[StrictStr] = Field(default=None, description="Short version of the brand name.") - logo_mode: Optional[StrictStr] = Field(default='icon_and_text', description="Logo display mode: 'icon_and_text' or 'logo_only'.") + brand_short_name: Optional[StrictStr] = Field( + default=None, description="Short version of the brand name." + ) + logo_mode: Optional[StrictStr] = Field( + default="icon_and_text", description="Logo display mode: 'icon_and_text' or 'logo_only'." + ) logo_icon_url: StrictStr = Field(description="Brand icon URL.") logo_full_url: StrictStr = Field(description="Brand full icon URL.") favicon_url: Optional[StrictStr] = Field(default=None, description="Favicon URL.") primary_color: StrictStr = Field(description="Primary frontend color.") - cloud_display_names: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of cloud provider IDs to display names (e.g. {'nebius': 'My Cloud'}).") - cloud_icon_urls: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of cloud provider IDs to icon URLs.") + cloud_display_names: Optional[Dict[str, StrictStr]] = Field( + default=None, + description="Map of cloud provider IDs to display names (e.g. {'nebius': 'My Cloud'}).", + ) + cloud_icon_urls: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Map of cloud provider IDs to icon URLs." + ) support_email: StrictStr = Field(description="Support contact email.") website_url: StrictStr = Field(description="Website URL.") docs_url: Optional[StrictStr] = Field(default=None, description="Documentation URL.") - __properties: ClassVar[List[str]] = ["enabled", "brand_name", "brand_short_name", "logo_mode", "logo_icon_url", "logo_full_url", "favicon_url", "primary_color", "cloud_display_names", "cloud_icon_urls", "support_email", "website_url", "docs_url"] + __properties: ClassVar[List[str]] = [ + "enabled", + "brand_name", + "brand_short_name", + "logo_mode", + "logo_icon_url", + "logo_full_url", + "favicon_url", + "primary_color", + "cloud_display_names", + "cloud_icon_urls", + "support_email", + "website_url", + "docs_url", + ] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +71,6 @@ class WhiteLabelConfiguration(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,8 +95,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -83,27 +105,27 @@ def to_dict(self) -> Dict[str, Any]: # set to None if brand_short_name (nullable) is None # and model_fields_set contains the field if self.brand_short_name is None and "brand_short_name" in self.model_fields_set: - _dict['brand_short_name'] = None + _dict["brand_short_name"] = None # set to None if favicon_url (nullable) is None # and model_fields_set contains the field if self.favicon_url is None and "favicon_url" in self.model_fields_set: - _dict['favicon_url'] = None + _dict["favicon_url"] = None # set to None if cloud_display_names (nullable) is None # and model_fields_set contains the field if self.cloud_display_names is None and "cloud_display_names" in self.model_fields_set: - _dict['cloud_display_names'] = None + _dict["cloud_display_names"] = None # set to None if cloud_icon_urls (nullable) is None # and model_fields_set contains the field if self.cloud_icon_urls is None and "cloud_icon_urls" in self.model_fields_set: - _dict['cloud_icon_urls'] = None + _dict["cloud_icon_urls"] = None # set to None if docs_url (nullable) is None # and model_fields_set contains the field if self.docs_url is None and "docs_url" in self.model_fields_set: - _dict['docs_url'] = None + _dict["docs_url"] = None return _dict @@ -116,21 +138,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "enabled": obj.get("enabled"), - "brand_name": obj.get("brand_name"), - "brand_short_name": obj.get("brand_short_name"), - "logo_mode": obj.get("logo_mode") if obj.get("logo_mode") is not None else 'icon_and_text', - "logo_icon_url": obj.get("logo_icon_url"), - "logo_full_url": obj.get("logo_full_url"), - "favicon_url": obj.get("favicon_url"), - "primary_color": obj.get("primary_color"), - "cloud_display_names": obj.get("cloud_display_names"), - "cloud_icon_urls": obj.get("cloud_icon_urls"), - "support_email": obj.get("support_email"), - "website_url": obj.get("website_url"), - "docs_url": obj.get("docs_url") - }) + _obj = cls.model_validate( + { + "enabled": obj.get("enabled"), + "brand_name": obj.get("brand_name"), + "brand_short_name": obj.get("brand_short_name"), + "logo_mode": ( + obj.get("logo_mode") if obj.get("logo_mode") is not None else "icon_and_text" + ), + "logo_icon_url": obj.get("logo_icon_url"), + "logo_full_url": obj.get("logo_full_url"), + "favicon_url": obj.get("favicon_url"), + "primary_color": obj.get("primary_color"), + "cloud_display_names": obj.get("cloud_display_names"), + "cloud_icon_urls": obj.get("cloud_icon_urls"), + "support_email": obj.get("support_email"), + "website_url": obj.get("website_url"), + "docs_url": obj.get("docs_url"), + } + ) return _obj - - diff --git a/saturn_api/models/workload_type.py b/saturn_api/models/workload_type.py index a340bae..e413a9c 100644 --- a/saturn_api/models/workload_type.py +++ b/saturn_api/models/workload_type.py @@ -1,20 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,15 +27,13 @@ class WorkloadType(str, Enum): """ allowed enum values """ - DASK = 'dask' - DEPLOYMENT = 'deployment' - IMAGE_BUILD = 'image_build' - JOB = 'job' - WORKSPACE = 'workspace' + DASK = "dask" + DEPLOYMENT = "deployment" + IMAGE_BUILD = "image_build" + JOB = "job" + WORKSPACE = "workspace" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of WorkloadType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/saturn_api/models/workspace.py b/saturn_api/models/workspace.py index d7a0a92..345cabf 100644 --- a/saturn_api/models/workspace.py +++ b/saturn_api/models/workspace.py @@ -1,79 +1,142 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) +from typing_extensions import Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional from saturn_api.models.dask_cluster_nested import DaskClusterNested from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.image_tag import ImageTag from saturn_api.models.owner import Owner -from typing import Literal, Optional, Set -from typing_extensions import Self + class Workspace(BaseModel): """ Workspace - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="ID of the workspace") name: StrictStr = Field(description="Name of the workspace.") owner: Owner = Field(description="Owner of the workspace.") description: StrictStr = Field(description="Description of the workspace.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the workspace.") + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the workspace." + ) image_tag: ImageTag = Field(description="Image tag that is attached to the workspace.") - extra_packages: Optional[ExtraPackages] = Field(description="Addtitional packages to install on start.") + extra_packages: Optional[ExtraPackages] = Field( + description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, Dict[str, StrictStr]]] = Field( + default=None, description="User-defined config files written to $HOME at pod startup." + ) ide: StrictStr = Field(description="IDE of the workspace") - start_script: Optional[StrictStr] = Field(description="Shell script that runs on start before the primary command.") - environment_variables: Dict[str, StrictStr] = Field(description="Mapping of environment variable keys to values.") + start_script: Optional[StrictStr] = Field( + description="Shell script that runs on start before the primary command." + ) + environment_variables: Dict[str, StrictStr] = Field( + description="Mapping of environment variable keys to values." + ) working_dir: StrictStr = Field(description="Initial working directory.") - disk_space: StrictStr = Field(description="Size of the persistent volume attached to the workspace.") + disk_space: StrictStr = Field( + description="Size of the persistent volume attached to the workspace." + ) instance_size: StrictStr = Field(description="Instance size of the workspace.") - auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] + auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] start_ssh: StrictBool = Field(description="Enable SSH access on the workspace.") is_spot: StrictBool = Field(description="Enables running on spot instance sizes.") subdomain: StrictStr = Field(description="Subdomain for the workspace URL.") start_dind: StrictBool = Field(description="Enables docker-in-docker.") - resource_type: Literal['workspace'] + resource_type: Literal["workspace"] size_display: StrictStr = Field(description="Description of the instance size.") k8s_name: StrictStr = Field(description="Unique name for associated kubernetes objects.") - require_restart: StrictBool = Field(description="True if an update was applied that requires restart to take effect") + require_restart: StrictBool = Field( + description="True if an update was applied that requires restart to take effect" + ) created_at: StrictStr = Field(description="Creation timestamp.") updated_at: StrictStr = Field(description="Updated timestamp.") started_at: Optional[StrictStr] = Field(description="Last started timestamp.") - self_destruct: Optional[StrictBool] = Field(default=None, description="Auto delete the workspace on stop.") - dask_cluster: Optional[DaskClusterNested] = Field(default=None, description="Dask cluster attached to the workspace.") + self_destruct: Optional[StrictBool] = Field( + default=None, description="Auto delete the workspace on stop." + ) + dask_cluster: Optional[DaskClusterNested] = Field( + default=None, description="Dask cluster attached to the workspace." + ) status: StrictStr = Field(description="Current status of the workspace.") debug_mode: StrictBool = Field(description="True if workspace is running in debug mode.") url: StrictStr = Field(description="External URL for the workspace.") ssh_url: Optional[StrictStr] = Field(description="External SSH URL for the workspace.") - __properties: ClassVar[List[str]] = ["id", "name", "owner", "description", "tags", "image_tag", "extra_packages", "ide", "start_script", "environment_variables", "working_dir", "disk_space", "instance_size", "auto_shutoff", "start_ssh", "is_spot", "subdomain", "start_dind", "resource_type", "size_display", "k8s_name", "require_restart", "created_at", "updated_at", "started_at", "self_destruct", "dask_cluster", "status", "debug_mode", "url", "ssh_url"] + __properties: ClassVar[List[str]] = [ + "id", + "name", + "owner", + "description", + "tags", + "image_tag", + "extra_packages", + "config_files", + "ide", + "start_script", + "environment_variables", + "working_dir", + "disk_space", + "instance_size", + "auto_shutoff", + "start_ssh", + "is_spot", + "subdomain", + "start_dind", + "resource_type", + "size_display", + "k8s_name", + "require_restart", + "created_at", + "updated_at", + "started_at", + "self_destruct", + "dask_cluster", + "status", + "debug_mode", + "url", + "ssh_url", + ] - @field_validator('auto_shutoff') + @field_validator("auto_shutoff") def auto_shutoff_validate_enum(cls, value): """Validates the enum""" - if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): - raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") + if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): + raise ValueError( + "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" + ) return value - @field_validator('resource_type') + @field_validator("resource_type") def resource_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['workspace']): + if value not in set(["workspace"]): raise ValueError("must be one of enum values ('workspace')") return value @@ -83,7 +146,6 @@ def resource_type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -137,39 +199,43 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "id", - "name", - "owner", - "description", - "image_tag", - "extra_packages", - "ide", - "start_script", - "environment_variables", - "working_dir", - "disk_space", - "instance_size", - "auto_shutoff", - "start_ssh", - "is_spot", - "subdomain", - "start_dind", - "resource_type", - "size_display", - "k8s_name", - "require_restart", - "created_at", - "updated_at", - "started_at", - "self_destruct", - "dask_cluster", - "status", - "debug_mode", - "url", - "ssh_url", - ]) + excluded_fields: Set[str] = set( + [ + "id", + "name", + "owner", + "description", + "image_tag", + "extra_packages", + "config_files", + "ide", + "start_script", + "environment_variables", + "working_dir", + "disk_space", + "instance_size", + "auto_shutoff", + "start_ssh", + "is_spot", + "subdomain", + "start_dind", + "resource_type", + "size_display", + "k8s_name", + "require_restart", + "created_at", + "updated_at", + "started_at", + "self_destruct", + "dask_cluster", + "status", + "debug_mode", + "url", + "ssh_url", + ] + ) _dict = self.model_dump( by_alias=True, @@ -178,40 +244,45 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image_tag if self.image_tag: - _dict['image_tag'] = self.image_tag.to_dict() + _dict["image_tag"] = self.image_tag.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict['dask_cluster'] = self.dask_cluster.to_dict() + _dict["dask_cluster"] = self.dask_cluster.to_dict() # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if ssh_url (nullable) is None # and model_fields_set contains the field if self.ssh_url is None and "ssh_url" in self.model_fields_set: - _dict['ssh_url'] = None + _dict["ssh_url"] = None return _dict @@ -224,39 +295,52 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_tag": ImageTag.from_dict(obj["image_tag"]) if obj.get("image_tag") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "ide": obj.get("ide"), - "start_script": obj.get("start_script"), - "environment_variables": obj.get("environment_variables"), - "working_dir": obj.get("working_dir"), - "disk_space": obj.get("disk_space"), - "instance_size": obj.get("instance_size"), - "auto_shutoff": obj.get("auto_shutoff"), - "start_ssh": obj.get("start_ssh"), - "is_spot": obj.get("is_spot"), - "subdomain": obj.get("subdomain"), - "start_dind": obj.get("start_dind"), - "resource_type": obj.get("resource_type"), - "size_display": obj.get("size_display"), - "k8s_name": obj.get("k8s_name"), - "require_restart": obj.get("require_restart"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "started_at": obj.get("started_at"), - "self_destruct": obj.get("self_destruct"), - "dask_cluster": DaskClusterNested.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, - "status": obj.get("status"), - "debug_mode": obj.get("debug_mode"), - "url": obj.get("url"), - "ssh_url": obj.get("ssh_url") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "owner": Owner.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_tag": ( + ImageTag.from_dict(obj["image_tag"]) + if obj.get("image_tag") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": obj.get("config_files"), + "ide": obj.get("ide"), + "start_script": obj.get("start_script"), + "environment_variables": obj.get("environment_variables"), + "working_dir": obj.get("working_dir"), + "disk_space": obj.get("disk_space"), + "instance_size": obj.get("instance_size"), + "auto_shutoff": obj.get("auto_shutoff"), + "start_ssh": obj.get("start_ssh"), + "is_spot": obj.get("is_spot"), + "subdomain": obj.get("subdomain"), + "start_dind": obj.get("start_dind"), + "resource_type": obj.get("resource_type"), + "size_display": obj.get("size_display"), + "k8s_name": obj.get("k8s_name"), + "require_restart": obj.get("require_restart"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "started_at": obj.get("started_at"), + "self_destruct": obj.get("self_destruct"), + "dask_cluster": ( + DaskClusterNested.from_dict(obj["dask_cluster"]) + if obj.get("dask_cluster") is not None + else None + ), + "status": obj.get("status"), + "debug_mode": obj.get("debug_mode"), + "url": obj.get("url"), + "ssh_url": obj.get("ssh_url"), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_create.py b/saturn_api/models/workspace_create.py index 766982f..b213fa0 100644 --- a/saturn_api/models/workspace_create.py +++ b/saturn_api/models/workspace_create.py @@ -1,75 +1,143 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) from saturn_api.models.extra_packages import ExtraPackages from saturn_api.models.owner_reference import OwnerReference -from typing import Literal, Optional, Set -from typing_extensions import Self + class WorkspaceCreate(BaseModel): """ WorkspaceCreate - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="Name of the workspace.") owner: Optional[OwnerReference] = Field(default=None, description="Owner of the workspace.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='', description="Description of the workspace.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the workspace.") - instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the workspace.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default="", description="Description of the workspace." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the workspace." + ) + instance_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the workspace." + ) image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") - environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments for the workspace.") - extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script to run on start before the primary command.") - working_dir: Optional[StrictStr] = Field(default='/home/jovyan/workspace', description="Initial working directory for the workspace.") - is_spot: Optional[StrictBool] = Field(default=False, description="Enables running on spot instance sizes.") + image_enforce_trusted: Optional[StrictBool] = Field( + default=True, description="Enable image trust validation before attaching." + ) + environment_variables: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Mapping of environment variable keys to values." + ) + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( + default=None, description="List of external repo attachments for the workspace." + ) + extra_packages: Optional[ExtraPackages] = Field( + default=None, description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, ConfigFileEntry]] = Field( + default=None, + description="User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode.", + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script to run on start before the primary command." + ) + working_dir: Optional[StrictStr] = Field( + default="/home/jovyan/workspace", description="Initial working directory for the workspace." + ) + is_spot: Optional[StrictBool] = Field( + default=False, description="Enables running on spot instance sizes." + ) start_dind: Optional[StrictBool] = Field(default=False, description="Enables docker-in-docker.") - disk_space: Optional[StrictStr] = Field(default=None, description="Size of the persistent volume attached to the workspace.") - subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain of the workspace URL.") - auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] = '1 hour' - start_ssh: Optional[StrictBool] = Field(default=False, description="Enable SSH access on the deployment.") - ide: Literal['jupyter', 'rstudio'] = 'jupyter' - self_destruct: Optional[StrictBool] = Field(default=False, description="Auto delete the workspace on stop.") - __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "instance_size", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "is_spot", "start_dind", "disk_space", "subdomain", "auto_shutoff", "start_ssh", "ide", "self_destruct"] - - @field_validator('auto_shutoff') + disk_space: Optional[StrictStr] = Field( + default=None, description="Size of the persistent volume attached to the workspace." + ) + subdomain: Optional[StrictStr] = Field( + default=None, description="Subdomain of the workspace URL." + ) + auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] = "1 hour" + start_ssh: Optional[StrictBool] = Field( + default=False, description="Enable SSH access on the deployment." + ) + ide: Literal["jupyter", "rstudio"] = "jupyter" + self_destruct: Optional[StrictBool] = Field( + default=False, description="Auto delete the workspace on stop." + ) + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "tags", + "instance_size", + "image_uri", + "image_tag_id", + "image_enforce_trusted", + "environment_variables", + "external_repo_attachments", + "extra_packages", + "config_files", + "start_script", + "working_dir", + "is_spot", + "start_dind", + "disk_space", + "subdomain", + "auto_shutoff", + "start_ssh", + "ide", + "self_destruct", + ] + + @field_validator("auto_shutoff") def auto_shutoff_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): - raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") + if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): + raise ValueError( + "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" + ) return value - @field_validator('ide') + @field_validator("ide") def ide_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['jupyter', 'rstudio']): + if value not in set(["jupyter", "rstudio"]): raise ValueError("must be one of enum values ('jupyter', 'rstudio')") return value @@ -79,7 +147,6 @@ def ide_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -104,8 +171,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -114,41 +180,56 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in external_repo_attachments (list) _items = [] if self.external_repo_attachments: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if environment_variables (nullable) is None # and model_fields_set contains the field if self.environment_variables is None and "environment_variables" in self.model_fields_set: - _dict['environment_variables'] = None + _dict["environment_variables"] = None # set to None if external_repo_attachments (nullable) is None # and model_fields_set contains the field - if self.external_repo_attachments is None and "external_repo_attachments" in self.model_fields_set: - _dict['external_repo_attachments'] = None + if ( + self.external_repo_attachments is None + and "external_repo_attachments" in self.model_fields_set + ): + _dict["external_repo_attachments"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None return _dict @@ -161,29 +242,62 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description") if obj.get("description") is not None else '', - "tags": obj.get("tags"), - "instance_size": obj.get("instance_size"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir") if obj.get("working_dir") is not None else '/home/jovyan/workspace', - "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, - "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, - "disk_space": obj.get("disk_space"), - "subdomain": obj.get("subdomain"), - "auto_shutoff": obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else '1 hour', - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - "ide": obj.get("ide") if obj.get("ide") is not None else 'jupyter', - "self_destruct": obj.get("self_destruct") if obj.get("self_destruct") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description") if obj.get("description") is not None else "", + "tags": obj.get("tags"), + "instance_size": obj.get("instance_size"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": ( + obj.get("image_enforce_trusted") + if obj.get("image_enforce_trusted") is not None + else True + ), + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": ( + [ + ExternalRepoAttachmentNested.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "working_dir": ( + obj.get("working_dir") + if obj.get("working_dir") is not None + else "/home/jovyan/workspace" + ), + "is_spot": obj.get("is_spot") if obj.get("is_spot") is not None else False, + "start_dind": obj.get("start_dind") if obj.get("start_dind") is not None else False, + "disk_space": obj.get("disk_space"), + "subdomain": obj.get("subdomain"), + "auto_shutoff": ( + obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else "1 hour" + ), + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + "ide": obj.get("ide") if obj.get("ide") is not None else "jupyter", + "self_destruct": ( + obj.get("self_destruct") if obj.get("self_destruct") is not None else False + ), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_ide_default_images.py b/saturn_api/models/workspace_ide_default_images.py index f7dc8dd..725ed12 100644 --- a/saturn_api/models/workspace_ide_default_images.py +++ b/saturn_api/models/workspace_ide_default_images.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from saturn_api.models.default_images import DefaultImages -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.default_images import DefaultImages + + class WorkspaceIdeDefaultImages(BaseModel): """ WorkspaceIdeDefaultImages - """ # noqa: E501 + """ # noqa: E501 + jupyter: DefaultImages = Field(description="Default images for jupyter workspaces.") rstudio: DefaultImages = Field(description="Default images for rstudio workspaces.") __properties: ClassVar[List[str]] = ["jupyter", "rstudio"] @@ -37,7 +39,6 @@ class WorkspaceIdeDefaultImages(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,10 +65,12 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "jupyter", - "rstudio", - ]) + excluded_fields: Set[str] = set( + [ + "jupyter", + "rstudio", + ] + ) _dict = self.model_dump( by_alias=True, @@ -76,10 +79,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of jupyter if self.jupyter: - _dict['jupyter'] = self.jupyter.to_dict() + _dict["jupyter"] = self.jupyter.to_dict() # override the default output from pydantic by calling `to_dict()` of rstudio if self.rstudio: - _dict['rstudio'] = self.rstudio.to_dict() + _dict["rstudio"] = self.rstudio.to_dict() return _dict @classmethod @@ -91,10 +94,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "jupyter": DefaultImages.from_dict(obj["jupyter"]) if obj.get("jupyter") is not None else None, - "rstudio": DefaultImages.from_dict(obj["rstudio"]) if obj.get("rstudio") is not None else None - }) + _obj = cls.model_validate( + { + "jupyter": ( + DefaultImages.from_dict(obj["jupyter"]) + if obj.get("jupyter") is not None + else None + ), + "rstudio": ( + DefaultImages.from_dict(obj["rstudio"]) + if obj.get("rstudio") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_list.py b/saturn_api/models/workspace_list.py index 1c8c935..7f4c3d4 100644 --- a/saturn_api/models/workspace_list.py +++ b/saturn_api/models/workspace_list.py @@ -1,32 +1,34 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from saturn_api.models.workspace import Workspace -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.workspace import Workspace + + class WorkspaceList(BaseModel): """ WorkspaceList - """ # noqa: E501 + """ # noqa: E501 + workspaces: List[Workspace] = Field(description="List of workspaces.") prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -38,7 +40,6 @@ class WorkspaceList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "workspaces", - "prev_key", - "next_key", - ]) + excluded_fields: Set[str] = set( + [ + "workspaces", + "prev_key", + "next_key", + ] + ) _dict = self.model_dump( by_alias=True, @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_workspaces in self.workspaces: if _item_workspaces: _items.append(_item_workspaces.to_dict()) - _dict['workspaces'] = _items + _dict["workspaces"] = _items return _dict @classmethod @@ -95,11 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "workspaces": [Workspace.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None, - "prev_key": obj.get("prev_key"), - "next_key": obj.get("next_key") - }) + _obj = cls.model_validate( + { + "workspaces": ( + [Workspace.from_dict(_item) for _item in obj["workspaces"]] + if obj.get("workspaces") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_recipe.py b/saturn_api/models/workspace_recipe.py index becb926..8ba8f05 100644 --- a/saturn_api/models/workspace_recipe.py +++ b/saturn_api/models/workspace_recipe.py @@ -1,43 +1,45 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.resource_state import ResourceState from saturn_api.models.workspace_spec import WorkspaceSpec -from typing import Literal, Optional, Set -from typing_extensions import Self + class WorkspaceRecipe(BaseModel): """ WorkspaceRecipe - """ # noqa: E501 - schema_version: Optional[StrictStr] = '2025.10.01' - type: Literal['workspace'] + """ # noqa: E501 + + schema_version: Optional[StrictStr] = "2025.10.01" + type: Literal["workspace"] spec: WorkspaceSpec state: Optional[ResourceState] = None __properties: ClassVar[List[str]] = ["schema_version", "type", "spec", "state"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['workspace']): + if value not in set(["workspace"]): raise ValueError("must be one of enum values ('workspace')") return value @@ -47,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,9 +74,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "state", - ]) + excluded_fields: Set[str] = set( + [ + "state", + ] + ) _dict = self.model_dump( by_alias=True, @@ -84,10 +87,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of spec if self.spec: - _dict['spec'] = self.spec.to_dict() + _dict["spec"] = self.spec.to_dict() # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict['state'] = self.state.to_dict() + _dict["state"] = self.state.to_dict() return _dict @classmethod @@ -99,12 +102,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "schema_version": obj.get("schema_version") if obj.get("schema_version") is not None else '2025.10.01', - "type": obj.get("type"), - "spec": WorkspaceSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, - "state": ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None - }) + _obj = cls.model_validate( + { + "schema_version": ( + obj.get("schema_version") + if obj.get("schema_version") is not None + else "2025.10.01" + ), + "type": obj.get("type"), + "spec": ( + WorkspaceSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None + ), + "state": ( + ResourceState.from_dict(obj["state"]) if obj.get("state") is not None else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_route_recipe.py b/saturn_api/models/workspace_route_recipe.py index 7309fa1..edd801e 100644 --- a/saturn_api/models/workspace_route_recipe.py +++ b/saturn_api/models/workspace_route_recipe.py @@ -1,44 +1,44 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Literal, Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class WorkspaceRouteRecipe(BaseModel): """ WorkspaceRouteRecipe - """ # noqa: E501 - subdomain: Optional[StrictStr] = '' + """ # noqa: E501 + + subdomain: Optional[StrictStr] = "" container_port: Annotated[int, Field(le=65535, strict=True, ge=1024)] - visibility: Literal['org', 'owner'] | None = None + visibility: Literal["org", "owner"] | None = None __properties: ClassVar[List[str]] = ["subdomain", "container_port", "visibility"] - @field_validator('visibility') + @field_validator("visibility") def visibility_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['org', 'owner']): + if value not in set(["org", "owner"]): raise ValueError("must be one of enum values ('org', 'owner')") return value @@ -48,7 +48,6 @@ def visibility_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +72,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -92,11 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else '', - "container_port": obj.get("container_port"), - "visibility": obj.get("visibility") - }) + _obj = cls.model_validate( + { + "subdomain": obj.get("subdomain") if obj.get("subdomain") is not None else "", + "container_port": obj.get("container_port"), + "visibility": obj.get("visibility"), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_runtime_summary.py b/saturn_api/models/workspace_runtime_summary.py index 97060ae..1a64ac7 100644 --- a/saturn_api/models/workspace_runtime_summary.py +++ b/saturn_api/models/workspace_runtime_summary.py @@ -1,34 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from saturn_api.models.condition import Condition from saturn_api.models.deployment_status import DeploymentStatus -from typing import Literal, Optional, Set -from typing_extensions import Self + class WorkspaceRuntimeSummary(BaseModel): """ WorkspaceRuntimeSummary - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr namespace: StrictStr uid: StrictStr @@ -44,7 +46,23 @@ class WorkspaceRuntimeSummary(BaseModel): running_count: StrictInt active_count: StrictInt disk_space: StrictStr - __properties: ClassVar[List[str]] = ["name", "namespace", "uid", "controller_uid", "controller_kind", "labels", "annotations", "conditions", "started_at", "deleted_at", "status", "scale", "running_count", "active_count", "disk_space"] + __properties: ClassVar[List[str]] = [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "status", + "scale", + "running_count", + "active_count", + "disk_space", + ] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +70,6 @@ class WorkspaceRuntimeSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,22 +108,24 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "name", - "namespace", - "uid", - "controller_uid", - "controller_kind", - "labels", - "annotations", - "conditions", - "started_at", - "deleted_at", - "scale", - "running_count", - "active_count", - "disk_space", - ]) + excluded_fields: Set[str] = set( + [ + "name", + "namespace", + "uid", + "controller_uid", + "controller_kind", + "labels", + "annotations", + "conditions", + "started_at", + "deleted_at", + "scale", + "running_count", + "active_count", + "disk_space", + ] + ) _dict = self.model_dump( by_alias=True, @@ -119,26 +138,26 @@ def to_dict(self) -> Dict[str, Any]: for _item_conditions in self.conditions: if _item_conditions: _items.append(_item_conditions.to_dict()) - _dict['conditions'] = _items + _dict["conditions"] = _items # set to None if controller_uid (nullable) is None # and model_fields_set contains the field if self.controller_uid is None and "controller_uid" in self.model_fields_set: - _dict['controller_uid'] = None + _dict["controller_uid"] = None # set to None if controller_kind (nullable) is None # and model_fields_set contains the field if self.controller_kind is None and "controller_kind" in self.model_fields_set: - _dict['controller_kind'] = None + _dict["controller_kind"] = None # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: - _dict['started_at'] = None + _dict["started_at"] = None # set to None if deleted_at (nullable) is None # and model_fields_set contains the field if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None + _dict["deleted_at"] = None return _dict @@ -151,23 +170,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "uid": obj.get("uid"), - "controller_uid": obj.get("controller_uid"), - "controller_kind": obj.get("controller_kind"), - "labels": obj.get("labels"), - "annotations": obj.get("annotations"), - "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "started_at": obj.get("started_at"), - "deleted_at": obj.get("deleted_at"), - "status": obj.get("status"), - "scale": obj.get("scale"), - "running_count": obj.get("running_count"), - "active_count": obj.get("active_count"), - "disk_space": obj.get("disk_space") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "uid": obj.get("uid"), + "controller_uid": obj.get("controller_uid"), + "controller_kind": obj.get("controller_kind"), + "labels": obj.get("labels"), + "annotations": obj.get("annotations"), + "conditions": ( + [Condition.from_dict(_item) for _item in obj["conditions"]] + if obj.get("conditions") is not None + else None + ), + "started_at": obj.get("started_at"), + "deleted_at": obj.get("deleted_at"), + "status": obj.get("status"), + "scale": obj.get("scale"), + "running_count": obj.get("running_count"), + "active_count": obj.get("active_count"), + "disk_space": obj.get("disk_space"), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_server_info.py b/saturn_api/models/workspace_server_info.py index 8431a32..39e4092 100644 --- a/saturn_api/models/workspace_server_info.py +++ b/saturn_api/models/workspace_server_info.py @@ -1,35 +1,39 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.workspace_ide_default_images import WorkspaceIdeDefaultImages from saturn_api.models.workspace_server_options import WorkspaceServerOptions -from typing import Literal, Optional, Set -from typing_extensions import Self + class WorkspaceServerInfo(BaseModel): """ WorkspaceServerInfo - """ # noqa: E501 - server_options: WorkspaceServerOptions = Field(description="Configuration options for workspaces.") + """ # noqa: E501 + + server_options: WorkspaceServerOptions = Field( + description="Configuration options for workspaces." + ) default_images: WorkspaceIdeDefaultImages = Field(description="Default images for workspaces.") default_sizes: DefaultSizes = Field(description="Default instance sizes for workspaces.") __properties: ClassVar[List[str]] = ["server_options", "default_images", "default_sizes"] @@ -40,7 +44,6 @@ class WorkspaceServerInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "server_options", - "default_images", - "default_sizes", - ]) + excluded_fields: Set[str] = set( + [ + "server_options", + "default_images", + "default_sizes", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,13 +86,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of server_options if self.server_options: - _dict['server_options'] = self.server_options.to_dict() + _dict["server_options"] = self.server_options.to_dict() # override the default output from pydantic by calling `to_dict()` of default_images if self.default_images: - _dict['default_images'] = self.default_images.to_dict() + _dict["default_images"] = self.default_images.to_dict() # override the default output from pydantic by calling `to_dict()` of default_sizes if self.default_sizes: - _dict['default_sizes'] = self.default_sizes.to_dict() + _dict["default_sizes"] = self.default_sizes.to_dict() return _dict @classmethod @@ -99,11 +104,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "server_options": WorkspaceServerOptions.from_dict(obj["server_options"]) if obj.get("server_options") is not None else None, - "default_images": WorkspaceIdeDefaultImages.from_dict(obj["default_images"]) if obj.get("default_images") is not None else None, - "default_sizes": DefaultSizes.from_dict(obj["default_sizes"]) if obj.get("default_sizes") is not None else None - }) + _obj = cls.model_validate( + { + "server_options": ( + WorkspaceServerOptions.from_dict(obj["server_options"]) + if obj.get("server_options") is not None + else None + ), + "default_images": ( + WorkspaceIdeDefaultImages.from_dict(obj["default_images"]) + if obj.get("default_images") is not None + else None + ), + "default_sizes": ( + DefaultSizes.from_dict(obj["default_sizes"]) + if obj.get("default_sizes") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_server_options.py b/saturn_api/models/workspace_server_options.py index 5e33333..45c6633 100644 --- a/saturn_api/models/workspace_server_options.py +++ b/saturn_api/models/workspace_server_options.py @@ -1,43 +1,47 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from saturn_api.models.instance_size import InstanceSize -from typing import Literal, Optional, Set from typing_extensions import Self +from saturn_api.models.instance_size import InstanceSize + + class WorkspaceServerOptions(BaseModel): """ WorkspaceServerOptions - """ # noqa: E501 - auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] + """ # noqa: E501 + + auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] disk_space: List[StrictStr] = Field(description="List of available disk space sizes.") size: List[InstanceSize] = Field(description="List of available instance sizes.") __properties: ClassVar[List[str]] = ["auto_shutoff", "disk_space", "size"] - @field_validator('auto_shutoff') + @field_validator("auto_shutoff") def auto_shutoff_validate_enum(cls, value): """Validates the enum""" for i in value: - if i not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): - raise ValueError("each list item must be one of ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") + if i not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): + raise ValueError( + "each list item must be one of ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" + ) return value model_config = ConfigDict( @@ -46,7 +50,6 @@ def auto_shutoff_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,11 +77,13 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([ - "auto_shutoff", - "disk_space", - "size", - ]) + excluded_fields: Set[str] = set( + [ + "auto_shutoff", + "disk_space", + "size", + ] + ) _dict = self.model_dump( by_alias=True, @@ -91,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_size in self.size: if _item_size: _items.append(_item_size.to_dict()) - _dict['size'] = _items + _dict["size"] = _items return _dict @classmethod @@ -103,11 +108,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "auto_shutoff": obj.get("auto_shutoff"), - "disk_space": obj.get("disk_space"), - "size": [InstanceSize.from_dict(_item) for _item in obj["size"]] if obj.get("size") is not None else None - }) + _obj = cls.model_validate( + { + "auto_shutoff": obj.get("auto_shutoff"), + "disk_space": obj.get("disk_space"), + "size": ( + [InstanceSize.from_dict(_item) for _item in obj["size"]] + if obj.get("size") is not None + else None + ), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_spec.py b/saturn_api/models/workspace_spec.py index d98a99d..f48724b 100644 --- a/saturn_api/models/workspace_spec.py +++ b/saturn_api/models/workspace_spec.py @@ -1,41 +1,54 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry from saturn_api.models.dask_cluster_attachment import DaskClusterAttachment -from saturn_api.models.external_repo_attachment_recipe import ExternalRepoAttachmentRecipe +from saturn_api.models.external_repo_attachment_recipe import ( + ExternalRepoAttachmentRecipe, +) from saturn_api.models.extra_packages_recipe import ExtraPackagesRecipe from saturn_api.models.image_tag_reference import ImageTagReference from saturn_api.models.owner_reference import OwnerReference from saturn_api.models.secret_attachment_recipe import SecretAttachmentRecipe -from saturn_api.models.shared_folder_attachment_recipe import SharedFolderAttachmentRecipe +from saturn_api.models.shared_folder_attachment_recipe import ( + SharedFolderAttachmentRecipe, +) from saturn_api.models.viewer_recipe import ViewerRecipe from saturn_api.models.workspace_route_recipe import WorkspaceRouteRecipe -from typing import Literal, Optional, Set -from typing_extensions import Self + class WorkspaceSpec(BaseModel): """ WorkspaceSpec - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr owner: Optional[OwnerReference] = None description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None @@ -45,6 +58,7 @@ class WorkspaceSpec(BaseModel): environment_variables: Optional[Dict[str, StrictStr]] = None working_directory: Optional[StrictStr] = None extra_packages: Optional[ExtraPackagesRecipe] = None + config_files: Optional[Dict[str, ConfigFileEntry]] = None start_script: Optional[StrictStr] = None token_scope: Optional[StrictStr] = None dask_cluster: Optional[DaskClusterAttachment] = None @@ -52,45 +66,74 @@ class WorkspaceSpec(BaseModel): secrets: Optional[List[SecretAttachmentRecipe]] = None shared_folders: Optional[List[SharedFolderAttachmentRecipe]] = None start_dind: Optional[StrictBool] = None - status: Literal['stopped', 'running'] | None = None - ide: Literal['jupyter', 'rstudio'] = 'jupyter' + status: Literal["stopped", "running"] | None = None + ide: Literal["jupyter", "rstudio"] = "jupyter" disk_space: Optional[StrictStr] = None - auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] = '1 hour' + auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] = "1 hour" start_ssh: Optional[StrictBool] = False use_spot_instance: Optional[StrictBool] = False routes: Optional[List[WorkspaceRouteRecipe]] = None viewers: Optional[List[ViewerRecipe]] = None self_destruct: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["name", "owner", "description", "tags", "image", "instance_type", "environment_variables", "working_directory", "extra_packages", "start_script", "token_scope", "dask_cluster", "git_repositories", "secrets", "shared_folders", "start_dind", "status", "ide", "disk_space", "auto_shutoff", "start_ssh", "use_spot_instance", "routes", "viewers", "self_destruct"] - - @field_validator('status') + __properties: ClassVar[List[str]] = [ + "name", + "owner", + "description", + "tags", + "image", + "instance_type", + "environment_variables", + "working_directory", + "extra_packages", + "config_files", + "start_script", + "token_scope", + "dask_cluster", + "git_repositories", + "secrets", + "shared_folders", + "start_dind", + "status", + "ide", + "disk_space", + "auto_shutoff", + "start_ssh", + "use_spot_instance", + "routes", + "viewers", + "self_destruct", + ] + + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['stopped', 'running']): + if value not in set(["stopped", "running"]): raise ValueError("must be one of enum values ('stopped', 'running')") return value - @field_validator('ide') + @field_validator("ide") def ide_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['jupyter', 'rstudio']): + if value not in set(["jupyter", "rstudio"]): raise ValueError("must be one of enum values ('jupyter', 'rstudio')") return value - @field_validator('auto_shutoff') + @field_validator("auto_shutoff") def auto_shutoff_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): - raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") + if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): + raise ValueError( + "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" + ) return value model_config = ConfigDict( @@ -99,7 +142,6 @@ def auto_shutoff_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -124,8 +166,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -134,70 +175,82 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of owner if self.owner: - _dict['owner'] = self.owner.to_dict() + _dict["owner"] = self.owner.to_dict() # override the default output from pydantic by calling `to_dict()` of image if self.image: - _dict['image'] = self.image.to_dict() + _dict["image"] = self.image.to_dict() # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # override the default output from pydantic by calling `to_dict()` of dask_cluster if self.dask_cluster: - _dict['dask_cluster'] = self.dask_cluster.to_dict() + _dict["dask_cluster"] = self.dask_cluster.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in git_repositories (list) _items = [] if self.git_repositories: for _item_git_repositories in self.git_repositories: if _item_git_repositories: _items.append(_item_git_repositories.to_dict()) - _dict['git_repositories'] = _items + _dict["git_repositories"] = _items # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) _items = [] if self.secrets: for _item_secrets in self.secrets: if _item_secrets: _items.append(_item_secrets.to_dict()) - _dict['secrets'] = _items + _dict["secrets"] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_folders (list) _items = [] if self.shared_folders: for _item_shared_folders in self.shared_folders: if _item_shared_folders: _items.append(_item_shared_folders.to_dict()) - _dict['shared_folders'] = _items + _dict["shared_folders"] = _items # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: if _item_routes: _items.append(_item_routes.to_dict()) - _dict['routes'] = _items + _dict["routes"] = _items # override the default output from pydantic by calling `to_dict()` of each item in viewers (list) _items = [] if self.viewers: for _item_viewers in self.viewers: if _item_viewers: _items.append(_item_viewers.to_dict()) - _dict['viewers'] = _items + _dict["viewers"] = _items # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if token_scope (nullable) is None # and model_fields_set contains the field if self.token_scope is None and "token_scope" in self.model_fields_set: - _dict['token_scope'] = None + _dict["token_scope"] = None # set to None if status (nullable) is None # and model_fields_set contains the field if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None + _dict["status"] = None return _dict @@ -210,33 +263,89 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "owner": OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None, - "description": obj.get("description"), - "tags": obj.get("tags"), - "image": ImageTagReference.from_dict(obj["image"]) if obj.get("image") is not None else None, - "instance_type": obj.get("instance_type"), - "environment_variables": obj.get("environment_variables"), - "working_directory": obj.get("working_directory"), - "extra_packages": ExtraPackagesRecipe.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "token_scope": obj.get("token_scope"), - "dask_cluster": DaskClusterAttachment.from_dict(obj["dask_cluster"]) if obj.get("dask_cluster") is not None else None, - "git_repositories": [ExternalRepoAttachmentRecipe.from_dict(_item) for _item in obj["git_repositories"]] if obj.get("git_repositories") is not None else None, - "secrets": [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, - "shared_folders": [SharedFolderAttachmentRecipe.from_dict(_item) for _item in obj["shared_folders"]] if obj.get("shared_folders") is not None else None, - "start_dind": obj.get("start_dind"), - "status": obj.get("status"), - "ide": obj.get("ide") if obj.get("ide") is not None else 'jupyter', - "disk_space": obj.get("disk_space"), - "auto_shutoff": obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else '1 hour', - "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, - "use_spot_instance": obj.get("use_spot_instance") if obj.get("use_spot_instance") is not None else False, - "routes": [WorkspaceRouteRecipe.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, - "viewers": [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] if obj.get("viewers") is not None else None, - "self_destruct": obj.get("self_destruct") if obj.get("self_destruct") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "owner": ( + OwnerReference.from_dict(obj["owner"]) if obj.get("owner") is not None else None + ), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image": ( + ImageTagReference.from_dict(obj["image"]) + if obj.get("image") is not None + else None + ), + "instance_type": obj.get("instance_type"), + "environment_variables": obj.get("environment_variables"), + "working_directory": obj.get("working_directory"), + "extra_packages": ( + ExtraPackagesRecipe.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "token_scope": obj.get("token_scope"), + "dask_cluster": ( + DaskClusterAttachment.from_dict(obj["dask_cluster"]) + if obj.get("dask_cluster") is not None + else None + ), + "git_repositories": ( + [ + ExternalRepoAttachmentRecipe.from_dict(_item) + for _item in obj["git_repositories"] + ] + if obj.get("git_repositories") is not None + else None + ), + "secrets": ( + [SecretAttachmentRecipe.from_dict(_item) for _item in obj["secrets"]] + if obj.get("secrets") is not None + else None + ), + "shared_folders": ( + [ + SharedFolderAttachmentRecipe.from_dict(_item) + for _item in obj["shared_folders"] + ] + if obj.get("shared_folders") is not None + else None + ), + "start_dind": obj.get("start_dind"), + "status": obj.get("status"), + "ide": obj.get("ide") if obj.get("ide") is not None else "jupyter", + "disk_space": obj.get("disk_space"), + "auto_shutoff": ( + obj.get("auto_shutoff") if obj.get("auto_shutoff") is not None else "1 hour" + ), + "start_ssh": obj.get("start_ssh") if obj.get("start_ssh") is not None else False, + "use_spot_instance": ( + obj.get("use_spot_instance") + if obj.get("use_spot_instance") is not None + else False + ), + "routes": ( + [WorkspaceRouteRecipe.from_dict(_item) for _item in obj["routes"]] + if obj.get("routes") is not None + else None + ), + "viewers": ( + [ViewerRecipe.from_dict(_item) for _item in obj["viewers"]] + if obj.get("viewers") is not None + else None + ), + "self_destruct": ( + obj.get("self_destruct") if obj.get("self_destruct") is not None else False + ), + } + ) return _obj - - diff --git a/saturn_api/models/workspace_start.py b/saturn_api/models/workspace_start.py index 899f082..4d03ff9 100644 --- a/saturn_api/models/workspace_start.py +++ b/saturn_api/models/workspace_start.py @@ -1,32 +1,36 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Literal, Optional, Set from typing_extensions import Self + class WorkspaceStart(BaseModel): """ WorkspaceStart - """ # noqa: E501 - debug_mode: Optional[StrictBool] = Field(default=None, description="Enable debug mode. Workspace will continue to run on error, and SSH will be enabled.") + """ # noqa: E501 + + debug_mode: Optional[StrictBool] = Field( + default=None, + description="Enable debug mode. Workspace will continue to run on error, and SSH will be enabled.", + ) __properties: ClassVar[List[str]] = ["debug_mode"] model_config = ConfigDict( @@ -35,7 +39,6 @@ class WorkspaceStart(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "debug_mode": obj.get("debug_mode") - }) + _obj = cls.model_validate({"debug_mode": obj.get("debug_mode")}) return _obj - - diff --git a/saturn_api/models/workspace_update.py b/saturn_api/models/workspace_update.py index c9b3f2f..95859f6 100644 --- a/saturn_api/models/workspace_update.py +++ b/saturn_api/models/workspace_update.py @@ -1,62 +1,125 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from saturn_api.models.external_repo_attachment_nested import ExternalRepoAttachmentNested +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) +from typing_extensions import Annotated, Self + +from saturn_api.models.config_file_entry import ConfigFileEntry +from saturn_api.models.external_repo_attachment_nested import ( + ExternalRepoAttachmentNested, +) from saturn_api.models.extra_packages import ExtraPackages -from typing import Literal, Optional, Set -from typing_extensions import Self + class WorkspaceUpdate(BaseModel): """ WorkspaceUpdate - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the workspace.") - description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Description of the workspace.") - tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Descriptive tags for the workspace.") + description: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default=None, description="Description of the workspace." + ) + tags: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Descriptive tags for the workspace." + ) image_uri: Optional[StrictStr] = Field(default=None, description="URI of the image to attach.") image_tag_id: Optional[StrictStr] = Field(default=None, description="Image tag ID to attach.") - image_enforce_trusted: Optional[StrictBool] = Field(default=True, description="Enable image trust validation before attaching.") - environment_variables: Optional[Dict[str, StrictStr]] = Field(default=None, description="Mapping of environment variable keys to values.") - external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field(default=None, description="List of external repo attachments.") - extra_packages: Optional[ExtraPackages] = Field(default=None, description="Addtitional packages to install on start.") - start_script: Optional[StrictStr] = Field(default=None, description="Shell script that runs on start before the primary command.") + image_enforce_trusted: Optional[StrictBool] = Field( + default=True, description="Enable image trust validation before attaching." + ) + environment_variables: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Mapping of environment variable keys to values." + ) + external_repo_attachments: Optional[List[ExternalRepoAttachmentNested]] = Field( + default=None, description="List of external repo attachments." + ) + extra_packages: Optional[ExtraPackages] = Field( + default=None, description="Addtitional packages to install on start." + ) + config_files: Optional[Dict[str, ConfigFileEntry]] = Field( + default=None, + description="User-defined config files written to $HOME at pod startup. Keys are relative paths; values contain content and mode.", + ) + start_script: Optional[StrictStr] = Field( + default=None, description="Shell script that runs on start before the primary command." + ) working_dir: Optional[StrictStr] = Field(default=None, description="Initial working directory.") - instance_size: Optional[StrictStr] = Field(default=None, description="Instance size of the workspace.") - is_spot: Optional[StrictBool] = Field(default=None, description="Enables running on spot instance sizes.") + instance_size: Optional[StrictStr] = Field( + default=None, description="Instance size of the workspace." + ) + is_spot: Optional[StrictBool] = Field( + default=None, description="Enables running on spot instance sizes." + ) start_dind: Optional[StrictBool] = Field(default=None, description="Enables docker-in-docker.") - disk_space: Optional[StrictStr] = Field(default=None, description="Size of the persistent volume attached to the workspace.") - subdomain: Optional[StrictStr] = Field(default=None, description="Subdomain of the workspace URL.") - auto_shutoff: Literal['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never'] | None = None - start_ssh: Optional[StrictBool] = Field(default=None, description="Enable SSH access on the deployment.") - __properties: ClassVar[List[str]] = ["name", "description", "tags", "image_uri", "image_tag_id", "image_enforce_trusted", "environment_variables", "external_repo_attachments", "extra_packages", "start_script", "working_dir", "instance_size", "is_spot", "start_dind", "disk_space", "subdomain", "auto_shutoff", "start_ssh"] + disk_space: Optional[StrictStr] = Field( + default=None, description="Size of the persistent volume attached to the workspace." + ) + subdomain: Optional[StrictStr] = Field( + default=None, description="Subdomain of the workspace URL." + ) + auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] | None = ( + None + ) + start_ssh: Optional[StrictBool] = Field( + default=None, description="Enable SSH access on the deployment." + ) + __properties: ClassVar[List[str]] = [ + "name", + "description", + "tags", + "image_uri", + "image_tag_id", + "image_enforce_trusted", + "environment_variables", + "external_repo_attachments", + "extra_packages", + "config_files", + "start_script", + "working_dir", + "instance_size", + "is_spot", + "start_dind", + "disk_space", + "subdomain", + "auto_shutoff", + "start_ssh", + ] - @field_validator('auto_shutoff') + @field_validator("auto_shutoff") def auto_shutoff_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never']): - raise ValueError("must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')") + if value not in set(["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"]): + raise ValueError( + "must be one of enum values ('1 hour', '6 hours', '24 hours', '3 days', '7 days', 'Never')" + ) return value model_config = ConfigDict( @@ -65,7 +128,6 @@ def auto_shutoff_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -90,8 +152,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -104,29 +165,41 @@ def to_dict(self) -> Dict[str, Any]: for _item_external_repo_attachments in self.external_repo_attachments: if _item_external_repo_attachments: _items.append(_item_external_repo_attachments.to_dict()) - _dict['external_repo_attachments'] = _items + _dict["external_repo_attachments"] = _items # override the default output from pydantic by calling `to_dict()` of extra_packages if self.extra_packages: - _dict['extra_packages'] = self.extra_packages.to_dict() + _dict["extra_packages"] = self.extra_packages.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in config_files (dict) + _field_dict = {} + if self.config_files: + for _key_config_files in self.config_files: + if self.config_files[_key_config_files]: + _field_dict[_key_config_files] = self.config_files[_key_config_files].to_dict() + _dict["config_files"] = _field_dict # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None + _dict["tags"] = None # set to None if extra_packages (nullable) is None # and model_fields_set contains the field if self.extra_packages is None and "extra_packages" in self.model_fields_set: - _dict['extra_packages'] = None + _dict["extra_packages"] = None + + # set to None if config_files (nullable) is None + # and model_fields_set contains the field + if self.config_files is None and "config_files" in self.model_fields_set: + _dict["config_files"] = None # set to None if start_script (nullable) is None # and model_fields_set contains the field if self.start_script is None and "start_script" in self.model_fields_set: - _dict['start_script'] = None + _dict["start_script"] = None # set to None if subdomain (nullable) is None # and model_fields_set contains the field if self.subdomain is None and "subdomain" in self.model_fields_set: - _dict['subdomain'] = None + _dict["subdomain"] = None return _dict @@ -139,26 +212,49 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "tags": obj.get("tags"), - "image_uri": obj.get("image_uri"), - "image_tag_id": obj.get("image_tag_id"), - "image_enforce_trusted": obj.get("image_enforce_trusted") if obj.get("image_enforce_trusted") is not None else True, - "environment_variables": obj.get("environment_variables"), - "external_repo_attachments": [ExternalRepoAttachmentNested.from_dict(_item) for _item in obj["external_repo_attachments"]] if obj.get("external_repo_attachments") is not None else None, - "extra_packages": ExtraPackages.from_dict(obj["extra_packages"]) if obj.get("extra_packages") is not None else None, - "start_script": obj.get("start_script"), - "working_dir": obj.get("working_dir"), - "instance_size": obj.get("instance_size"), - "is_spot": obj.get("is_spot"), - "start_dind": obj.get("start_dind"), - "disk_space": obj.get("disk_space"), - "subdomain": obj.get("subdomain"), - "auto_shutoff": obj.get("auto_shutoff"), - "start_ssh": obj.get("start_ssh") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "image_uri": obj.get("image_uri"), + "image_tag_id": obj.get("image_tag_id"), + "image_enforce_trusted": ( + obj.get("image_enforce_trusted") + if obj.get("image_enforce_trusted") is not None + else True + ), + "environment_variables": obj.get("environment_variables"), + "external_repo_attachments": ( + [ + ExternalRepoAttachmentNested.from_dict(_item) + for _item in obj["external_repo_attachments"] + ] + if obj.get("external_repo_attachments") is not None + else None + ), + "extra_packages": ( + ExtraPackages.from_dict(obj["extra_packages"]) + if obj.get("extra_packages") is not None + else None + ), + "config_files": ( + dict( + (_k, ConfigFileEntry.from_dict(_v)) + for _k, _v in obj["config_files"].items() + ) + if obj.get("config_files") is not None + else None + ), + "start_script": obj.get("start_script"), + "working_dir": obj.get("working_dir"), + "instance_size": obj.get("instance_size"), + "is_spot": obj.get("is_spot"), + "start_dind": obj.get("start_dind"), + "disk_space": obj.get("disk_space"), + "subdomain": obj.get("subdomain"), + "auto_shutoff": obj.get("auto_shutoff"), + "start_ssh": obj.get("start_ssh"), + } + ) return _obj - - diff --git a/saturn_api/rest.py b/saturn_api/rest.py index d3b105a..81424cd 100644 --- a/saturn_api/rest.py +++ b/saturn_api/rest.py @@ -1,22 +1,21 @@ # coding: utf-8 """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import io import json import re import ssl -from typing import Optional, Union +from typing import Optional import httpx @@ -24,6 +23,7 @@ RESTResponseType = httpx.Response + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -81,13 +81,8 @@ async def close(self): await self.pool_manager.aclose() async def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None): + self, method, url, headers=None, body=None, post_params=None, _request_timeout=None + ): """Execute request :param method: http request method @@ -103,48 +98,33 @@ async def request( (connection, read) timeouts. """ method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] + assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) + raise ApiValueError("body parameter cannot be used with post_params parameter.") post_params = post_params or {} headers = headers or {} timeout = _request_timeout or 5 * 60 - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' + if "Content-Type" not in headers: + headers["Content-Type"] = "application/json" - args = { - "method": method, - "url": url, - "timeout": timeout, - "headers": headers - } + args = {"method": method, "url": url, "timeout": timeout, "headers": headers} # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if re.search('json', headers['Content-Type'], re.IGNORECASE): + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: + if re.search("json", headers["Content-Type"], re.IGNORECASE): if body is not None: args["json"] = body if body is None and post_params: args["json"] = dict(post_params) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 args["data"] = dict(post_params) - elif headers['Content-Type'] == 'multipart/form-data': + elif headers["Content-Type"] == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by httpx - del headers['Content-Type'] + del headers["Content-Type"] files = [] data = {} @@ -188,14 +168,8 @@ def _create_pool_manager(self) -> httpx.AsyncClient: proxy = None if self.proxy: - proxy = httpx.Proxy( - url=self.proxy, - headers=self.proxy_headers - ) + proxy = httpx.Proxy(url=self.proxy, headers=self.proxy_headers) return httpx.AsyncClient( - limits=limits, - proxy=proxy, - verify=self.ssl_context, - trust_env=True + limits=limits, proxy=proxy, verify=self.ssl_context, trust_env=True ) diff --git a/setup.py b/setup.py index f53e66b..19c68a0 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,15 @@ """ - Saturn Cloud +Saturn Cloud - The API for Saturn Cloud. +The API for Saturn Cloud. - The version of the OpenAPI document: 2026.02.01 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -from setuptools import setup, find_packages # noqa: H301 +from setuptools import find_packages, setup # noqa: H301 # To install the library, run the following # @@ -39,7 +38,7 @@ install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", long_description="""\ The API for Saturn Cloud. """, # noqa: E501 From 45df885957354789b472c429d3b1055cb7dd918b Mon Sep 17 00:00:00 2001 From: hugo Date: Tue, 2 Jun 2026 18:26:24 +0000 Subject: [PATCH 3/4] Regen client: token factory inference endpoints, dataset import/lock, FT job logs Regenerated from saturn release-2026.02.01 client.yaml (latest token-factory API). Adds InferenceEndpointsApi, DatasetsApi import/lock operations, FineTuningJobsApi get_logs, and supporting models. Co-Authored-By: Claude Opus 4.8 (1M context) --- .openapi-generator/FILES | 18 + Makefile | 1 + README.md | 18 + client.yaml | 751 ++++++- docs/AppInfo.md | 1 + docs/DatasetImportCreate.md | 32 + docs/DatasetLockCreate.md | 32 + docs/DatasetsApi.md | 166 ++ docs/DiskSpaceOption.md | 30 + docs/FineTuneJobCreate.md | 3 +- docs/FineTuneJobList.md | 2 +- docs/FineTuneJobSummary.md | 36 + docs/FineTuneJobView.md | 4 +- docs/FineTuningJobsApi.md | 91 + docs/InferenceEndpointCreate.md | 34 + docs/InferenceEndpointList.md | 31 + docs/InferenceEndpointSummary.md | 36 + docs/InferenceEndpointView.md | 37 + docs/InferenceEndpointsApi.md | 589 +++++ docs/ServerOptions.md | 2 +- docs/UsageLimits.md | 1 + docs/UsageLimitsCreate.md | 1 + docs/UsageLimitsUpdate.md | 1 + docs/WorkspaceServerOptions.md | 2 +- requirements.txt | 2 +- saturn_api/__init__.py | 32 + saturn_api/api/__init__.py | 1 + saturn_api/api/datasets_api.py | 500 +++++ saturn_api/api/fine_tuning_jobs_api.py | 348 +++ saturn_api/api/inference_endpoints_api.py | 1901 +++++++++++++++++ saturn_api/models/__init__.py | 8 + saturn_api/models/app_info.py | 5 + saturn_api/models/dataset_import_create.py | 105 + saturn_api/models/dataset_lock_create.py | 111 + saturn_api/models/disk_space_option.py | 94 + saturn_api/models/fine_tune_job_create.py | 32 +- saturn_api/models/fine_tune_job_list.py | 8 +- saturn_api/models/fine_tune_job_summary.py | 149 ++ saturn_api/models/fine_tune_job_view.py | 26 +- .../models/inference_endpoint_create.py | 137 ++ saturn_api/models/inference_endpoint_list.py | 114 + .../models/inference_endpoint_summary.py | 138 ++ saturn_api/models/inference_endpoint_view.py | 159 ++ saturn_api/models/server_options.py | 16 +- saturn_api/models/usage_limits.py | 12 + saturn_api/models/usage_limits_create.py | 11 + saturn_api/models/usage_limits_update.py | 11 + saturn_api/models/workspace_server_options.py | 16 +- 48 files changed, 5792 insertions(+), 63 deletions(-) create mode 100644 docs/DatasetImportCreate.md create mode 100644 docs/DatasetLockCreate.md create mode 100644 docs/DiskSpaceOption.md create mode 100644 docs/FineTuneJobSummary.md create mode 100644 docs/InferenceEndpointCreate.md create mode 100644 docs/InferenceEndpointList.md create mode 100644 docs/InferenceEndpointSummary.md create mode 100644 docs/InferenceEndpointView.md create mode 100644 docs/InferenceEndpointsApi.md create mode 100644 saturn_api/api/inference_endpoints_api.py create mode 100644 saturn_api/models/dataset_import_create.py create mode 100644 saturn_api/models/dataset_lock_create.py create mode 100644 saturn_api/models/disk_space_option.py create mode 100644 saturn_api/models/fine_tune_job_summary.py create mode 100644 saturn_api/models/inference_endpoint_create.py create mode 100644 saturn_api/models/inference_endpoint_list.py create mode 100644 saturn_api/models/inference_endpoint_summary.py create mode 100644 saturn_api/models/inference_endpoint_view.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index aa0a0ac..fa7220c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -62,7 +62,9 @@ docs/DaskWorkerSummary.md docs/DataPoint.md docs/Dataset.md docs/DatasetCreate.md +docs/DatasetImportCreate.md docs/DatasetList.md +docs/DatasetLockCreate.md docs/DatasetsApi.md docs/DefaultImages.md docs/DefaultSizes.md @@ -78,6 +80,7 @@ docs/DeploymentStart.md docs/DeploymentStatus.md docs/DeploymentUpdate.md docs/DeploymentsApi.md +docs/DiskSpaceOption.md docs/ExternalRepo.md docs/ExternalRepoAttachment.md docs/ExternalRepoAttachmentCreate.md @@ -97,6 +100,7 @@ docs/ExtraPackagesRecipeConda.md docs/ExtraPackagesRecipePip.md docs/FineTuneJobCreate.md docs/FineTuneJobList.md +docs/FineTuneJobSummary.md docs/FineTuneJobView.md docs/FineTuningJobsApi.md docs/Group.md @@ -140,6 +144,11 @@ docs/ImageTagUpdate.md docs/ImageTagsApi.md docs/ImageUpdate.md docs/ImagesApi.md +docs/InferenceEndpointCreate.md +docs/InferenceEndpointList.md +docs/InferenceEndpointSummary.md +docs/InferenceEndpointView.md +docs/InferenceEndpointsApi.md docs/InfoApi.md docs/InstanceSize.md docs/Invitation.md @@ -354,6 +363,7 @@ saturn_api/api/fine_tuning_jobs_api.py saturn_api/api/groups_api.py saturn_api/api/image_tags_api.py saturn_api/api/images_api.py +saturn_api/api/inference_endpoints_api.py saturn_api/api/info_api.py saturn_api/api/invitations_api.py saturn_api/api/jobs_api.py @@ -430,7 +440,9 @@ saturn_api/models/dask_worker_summary.py saturn_api/models/data_point.py saturn_api/models/dataset.py saturn_api/models/dataset_create.py +saturn_api/models/dataset_import_create.py saturn_api/models/dataset_list.py +saturn_api/models/dataset_lock_create.py saturn_api/models/default_images.py saturn_api/models/default_sizes.py saturn_api/models/deployment.py @@ -444,6 +456,7 @@ saturn_api/models/deployment_spec.py saturn_api/models/deployment_start.py saturn_api/models/deployment_status.py saturn_api/models/deployment_update.py +saturn_api/models/disk_space_option.py saturn_api/models/external_repo.py saturn_api/models/external_repo_attachment.py saturn_api/models/external_repo_attachment_create.py @@ -461,6 +474,7 @@ saturn_api/models/extra_packages_recipe_conda.py saturn_api/models/extra_packages_recipe_pip.py saturn_api/models/fine_tune_job_create.py saturn_api/models/fine_tune_job_list.py +saturn_api/models/fine_tune_job_summary.py saturn_api/models/fine_tune_job_view.py saturn_api/models/group.py saturn_api/models/group_create.py @@ -500,6 +514,10 @@ saturn_api/models/image_tag_reference.py saturn_api/models/image_tag_state.py saturn_api/models/image_tag_update.py saturn_api/models/image_update.py +saturn_api/models/inference_endpoint_create.py +saturn_api/models/inference_endpoint_list.py +saturn_api/models/inference_endpoint_summary.py +saturn_api/models/inference_endpoint_view.py saturn_api/models/instance_size.py saturn_api/models/invitation.py saturn_api/models/invitation_create.py diff --git a/Makefile b/Makefile index ef0fdf0..d6b27c3 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ update: copy-client-yaml generate format .PHONY: generate generate: openapi-generator-cli generate -g python -i client.yaml -c openapi-generator-config.yaml --remove-operation-id-prefix -t templates/python + @sed -i 's/^httpx = ">= \(.*\)"$$/httpx >= \1/' requirements.txt .PHONY: format format: diff --git a/README.md b/README.md index 88af54c..e04935f 100644 --- a/README.md +++ b/README.md @@ -151,10 +151,12 @@ Class | Method | HTTP request | Description *DaskClustersApi* | [**stop**](docs/DaskClustersApi.md#stop) | **POST** /api/dask_clusters/{dask_cluster_id}/stop | Stop dask cluster *DaskClustersApi* | [**update**](docs/DaskClustersApi.md#update) | **PATCH** /api/dask_clusters/{dask_cluster_id} | Update dask cluster *DaskClustersApi* | [**update_token**](docs/DaskClustersApi.md#update_token) | **PATCH** /api/dask_clusters/{dask_cluster_id}/token | Update dask cluster API token +*DatasetsApi* | [**call_import**](docs/DatasetsApi.md#call_import) | **POST** /api/orgs/{org_id}/token-factory/datasets/import | Import dataset *DatasetsApi* | [**create**](docs/DatasetsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/datasets | Create dataset *DatasetsApi* | [**delete**](docs/DatasetsApi.md#delete) | **DELETE** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Delete dataset *DatasetsApi* | [**get**](docs/DatasetsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Get dataset *DatasetsApi* | [**list**](docs/DatasetsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/datasets | List datasets +*DatasetsApi* | [**lock**](docs/DatasetsApi.md#lock) | **POST** /api/orgs/{org_id}/token-factory/datasets/lock | Lock shared folder as dataset *DatasetsApi* | [**seal**](docs/DatasetsApi.md#seal) | **POST** /api/orgs/{org_id}/token-factory/datasets/{dataset_id}/seal | Seal dataset *DeploymentsApi* | [**create**](docs/DeploymentsApi.md#create) | **POST** /api/deployments | Create deployment *DeploymentsApi* | [**create_resource_template**](docs/DeploymentsApi.md#create_resource_template) | **POST** /api/deployments/{deployment_id}/template | Create deployment resource template @@ -202,6 +204,7 @@ Class | Method | HTTP request | Description *ExternalReposApi* | [**update**](docs/ExternalReposApi.md#update) | **PATCH** /api/external_repos/{external_repo_id} | Update external repo *FineTuningJobsApi* | [**create**](docs/FineTuningJobsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | Create fine-tuning job *FineTuningJobsApi* | [**get**](docs/FineTuningJobsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id} | Get fine-tuning job +*FineTuningJobsApi* | [**get_logs**](docs/FineTuningJobsApi.md#get_logs) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/logs | Get fine-tuning job historical logs *FineTuningJobsApi* | [**jobs_cancel**](docs/FineTuningJobsApi.md#jobs_cancel) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel | Cancel fine-tuning job *FineTuningJobsApi* | [**list**](docs/FineTuningJobsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | List fine-tuning jobs *GroupsApi* | [**create**](docs/GroupsApi.md#create) | **POST** /api/groups | Create group @@ -227,6 +230,13 @@ Class | Method | HTTP request | Description *ImagesApi* | [**get**](docs/ImagesApi.md#get) | **GET** /api/images/{image_id} | Get image *ImagesApi* | [**list**](docs/ImagesApi.md#list) | **GET** /api/images | List images *ImagesApi* | [**update**](docs/ImagesApi.md#update) | **PATCH** /api/images/{image_id} | Update image +*InferenceEndpointsApi* | [**create**](docs/InferenceEndpointsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/inference-endpoints | Create inference endpoint +*InferenceEndpointsApi* | [**delete**](docs/InferenceEndpointsApi.md#delete) | **DELETE** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id} | Delete inference endpoint +*InferenceEndpointsApi* | [**endpoints_start**](docs/InferenceEndpointsApi.md#endpoints_start) | **POST** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/start | Start inference endpoint +*InferenceEndpointsApi* | [**endpoints_stop**](docs/InferenceEndpointsApi.md#endpoints_stop) | **POST** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/stop | Stop inference endpoint +*InferenceEndpointsApi* | [**get**](docs/InferenceEndpointsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id} | Get inference endpoint +*InferenceEndpointsApi* | [**get_logs**](docs/InferenceEndpointsApi.md#get_logs) | **GET** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/logs | Get inference endpoint historical logs +*InferenceEndpointsApi* | [**list**](docs/InferenceEndpointsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/inference-endpoints | List inference endpoints *InfoApi* | [**get**](docs/InfoApi.md#get) | **GET** /api/info | Get app info *InfoApi* | [**get_server_options**](docs/InfoApi.md#get_server_options) | **GET** /api/info/servers | Get server options *InvitationsApi* | [**create**](docs/InvitationsApi.md#create) | **POST** /api/invitations | Create invitation @@ -449,7 +459,9 @@ Class | Method | HTTP request | Description - [DataPoint](docs/DataPoint.md) - [Dataset](docs/Dataset.md) - [DatasetCreate](docs/DatasetCreate.md) + - [DatasetImportCreate](docs/DatasetImportCreate.md) - [DatasetList](docs/DatasetList.md) + - [DatasetLockCreate](docs/DatasetLockCreate.md) - [DefaultImages](docs/DefaultImages.md) - [DefaultSizes](docs/DefaultSizes.md) - [Deployment](docs/Deployment.md) @@ -463,6 +475,7 @@ Class | Method | HTTP request | Description - [DeploymentStart](docs/DeploymentStart.md) - [DeploymentStatus](docs/DeploymentStatus.md) - [DeploymentUpdate](docs/DeploymentUpdate.md) + - [DiskSpaceOption](docs/DiskSpaceOption.md) - [ExternalRepo](docs/ExternalRepo.md) - [ExternalRepoAttachment](docs/ExternalRepoAttachment.md) - [ExternalRepoAttachmentCreate](docs/ExternalRepoAttachmentCreate.md) @@ -480,6 +493,7 @@ Class | Method | HTTP request | Description - [ExtraPackagesRecipePip](docs/ExtraPackagesRecipePip.md) - [FineTuneJobCreate](docs/FineTuneJobCreate.md) - [FineTuneJobList](docs/FineTuneJobList.md) + - [FineTuneJobSummary](docs/FineTuneJobSummary.md) - [FineTuneJobView](docs/FineTuneJobView.md) - [Group](docs/Group.md) - [GroupCreate](docs/GroupCreate.md) @@ -519,6 +533,10 @@ Class | Method | HTTP request | Description - [ImageTagState](docs/ImageTagState.md) - [ImageTagUpdate](docs/ImageTagUpdate.md) - [ImageUpdate](docs/ImageUpdate.md) + - [InferenceEndpointCreate](docs/InferenceEndpointCreate.md) + - [InferenceEndpointList](docs/InferenceEndpointList.md) + - [InferenceEndpointSummary](docs/InferenceEndpointSummary.md) + - [InferenceEndpointView](docs/InferenceEndpointView.md) - [InstanceSize](docs/InstanceSize.md) - [Invitation](docs/Invitation.md) - [InvitationCreate](docs/InvitationCreate.md) diff --git a/client.yaml b/client.yaml index 29550d3..708dddd 100644 --- a/client.yaml +++ b/client.yaml @@ -5817,6 +5817,67 @@ paths: schema: $ref: '#/components/schemas/Dataset' description: Sealed + /api/orgs/{org_id}/token-factory/datasets/import: + post: + summary: Import dataset + description: 'Create a dataset in `assembling` state and launch a CPU job that + downloads the given Hugging Face dataset, auto-detects its shape, normalises + it to the canonical conversational format, and writes it into the org''s tf-datasets + folder. The job marks the dataset `ready` on success or `error` if the source + format is not recognised. + + ' + operationId: datasets_import + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetImportCreate' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + description: Import started + /api/orgs/{org_id}/token-factory/datasets/lock: + post: + summary: Lock shared folder as dataset + description: 'Register an existing SharedFolder (that already holds dataset + bytes) as a dataset, zero-copy, by locking it to ReadOnlyMany. No job runs + and nothing is copied; the dataset is immediately `ready` and its location + points at the existing folder. The folder becomes read-only. + + ' + operationId: datasets_lock + tags: + - datasets + parameters: + - name: org_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetLockCreate' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + description: Locked and registered /api/orgs/{org_id}/token-factory/fine-tuning/jobs: get: summary: List fine-tuning jobs @@ -5917,18 +5978,302 @@ paths: description: Ok /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel: post: - summary: Cancel fine-tuning job - description: Stop the underlying intermittent deployment. - operationId: finetune_jobs_cancel + summary: Cancel fine-tuning job + description: Stop the underlying intermittent deployment. + operationId: finetune_jobs_cancel + tags: + - fine-tuning jobs + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: job_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuneJobView' + description: Cancelled + /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/logs: + get: + summary: Get fine-tuning job historical logs + description: Historical record of logs from the resource. + operationId: fine-tuningjobs_getLogs + tags: + - fine_tuning_jobs + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: job_id + in: path + schema: + type: string + required: true + - in: query + name: pod_name + description: Name of the pod to retrieve logs from. + schema: + type: string + required: false + - in: query + name: cluster + description: Name of the cluster the pod lives in. + schema: + type: string + required: false + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Maximum number of results per page. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HistoricLogList' + description: Ok + /api/orgs/{org_id}/token-factory/inference-endpoints: + get: + summary: List inference endpoints + description: Paginated list of inference endpoints. + operationId: inferenceendpoints_list + tags: + - inference_endpoints + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Page size. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + - in: query + name: descending + description: List results in descending order. + schema: + type: boolean + default: false + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InferenceEndpointList' + description: Ok + post: + summary: Create inference endpoint + description: Create a new inference endpoint. + operationId: inferenceendpoints_create + tags: + - inference_endpoints + parameters: + - name: org_id + in: path + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InferenceEndpointCreate' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/InferenceEndpointView' + description: Created + /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}: + delete: + summary: Delete inference endpoint + description: Delete an inference endpoint. + operationId: inferenceendpoints_delete + tags: + - inference_endpoints + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: endpoint_id + in: path + schema: + type: string + required: true + responses: + '204': + description: Deleted + get: + summary: Get inference endpoint + description: Get an inference endpoint. + operationId: inferenceendpoints_get + tags: + - inference_endpoints + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: endpoint_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InferenceEndpointView' + description: Ok + /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/logs: + get: + summary: Get inference endpoint historical logs + description: Historical record of logs from the resource. + operationId: inferenceendpoints_getLogs + tags: + - inference_endpoints + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: endpoint_id + in: path + schema: + type: string + required: true + - in: query + name: pod_name + description: Name of the pod to retrieve logs from. + schema: + type: string + required: false + - in: query + name: cluster + description: Name of the cluster the pod lives in. + schema: + type: string + required: false + - in: query + name: prev_key + description: Previous page key. + schema: + type: string + required: false + - in: query + name: next_key + description: Next page key. + schema: + type: string + required: false + - in: query + name: page_size + description: Maximum number of results per page. + schema: + type: integer + default: 100 + minimum: 1 + maximum: 1000 + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HistoricLogList' + description: Ok + /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/start: + post: + summary: Start inference endpoint + description: Bring up the underlying persistent deployment. + operationId: inference_endpoints_start + tags: + - inference endpoints + parameters: + - name: org_id + in: path + schema: + type: string + required: true + - name: endpoint_id + in: path + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InferenceEndpointView' + description: Started + /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/stop: + post: + summary: Stop inference endpoint + description: Tear down the pod but keep the DB row. + operationId: inference_endpoints_stop tags: - - fine-tuning jobs + - inference endpoints parameters: - name: org_id in: path schema: type: string required: true - - name: job_id + - name: endpoint_id in: path schema: type: string @@ -5938,8 +6283,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FineTuneJobView' - description: Cancelled + $ref: '#/components/schemas/InferenceEndpointView' + description: Stopped /api/orgs/{org_id}/usage/aggregated: get: summary: Get org usage @@ -13677,6 +14022,11 @@ components: dind_enabled: type: boolean description: True if docker-in-docker is enabled. + token_factory_enabled_global: + type: boolean + description: Install-wide Token Factory switch (the global Settings flag). + Per-org enablement is narrowed client-side against the active owner's + usage-limit flag. apply_requires_confirm: type: boolean description: True if recipe apply should be confirmed. @@ -13713,9 +14063,25 @@ components: - network_filesystem_enabled - populate_examples - stripe_public_key + - token_factory_enabled_global - user_tracking - version - whitelabel + DiskSpaceOption: + type: object + properties: + value: + type: string + readOnly: true + description: Kubernetes-style disk size (e.g. '100Gi') submitted when creating + a resource. + display_str: + type: string + readOnly: true + description: Human-readable label shown in the picker. + required: + - display_str + - value ServerOptions: type: object properties: @@ -13728,9 +14094,9 @@ components: disk_space: type: array readOnly: true - description: List of available disk sizes for workspaces. + description: Available disk sizes for workspaces. items: - type: string + $ref: '#/components/schemas/DiskSpaceOption' sizes: type: object readOnly: true @@ -14161,6 +14527,12 @@ components: items: type: string nullable: true + token_factory_enabled: + type: boolean + readOnly: true + description: Whether Token Factory is available under this limit. Null inherits + the global setting; False hard-disables it. + nullable: true num_instances: type: integer readOnly: true @@ -14223,6 +14595,7 @@ components: - org_id - resource_types - storage_in_gb + - token_factory_enabled UsageLimitsList: type: object properties: @@ -14269,6 +14642,12 @@ components: items: type: string nullable: true + token_factory_enabled: + type: boolean + default: null + description: Whether Token Factory is available under this limit. Null inherits + the global setting; False hard-disables it. + nullable: true num_instances: type: integer default: null @@ -14348,6 +14727,12 @@ components: items: type: string nullable: true + token_factory_enabled: + type: boolean + default: null + description: Whether Token Factory is available under this limit. Null inherits + the global setting; False hard-disables it. + nullable: true num_instances: type: integer default: null @@ -15706,6 +16091,56 @@ components: additionalProperties: {} required: - name + DatasetImportCreate: + type: object + properties: + name: + type: string + minLength: 1 + description: Human-readable name for the dataset. + hf_dataset_id: + type: string + minLength: 1 + description: Hugging Face dataset identifier, e.g. ``databricks/databricks-dolly-15k``. + split: + type: string + default: train + minLength: 1 + description: 'Hugging Face split to import (default: ``train``).' + config_name: + type: string + default: null + description: Optional Hugging Face config/subset name. + nullable: true + required: + - hf_dataset_id + - name + DatasetLockCreate: + type: object + properties: + name: + type: string + minLength: 1 + description: Human-readable name for the dataset. + shared_folder_id: + type: string + minLength: 1 + description: ID of the existing SharedFolder to lock and register as a dataset. + subpath: + type: string + default: null + description: Optional subpath within the folder where the dataset bytes + live (e.g. ``data.jsonl`` or ``subdir/``). Defaults to the folder root. + nullable: true + metadata: + type: object + default: null + description: Optional metadata blob (schema_type, row_count, etc.). + nullable: true + additionalProperties: {} + required: + - name + - shared_folder_id Hyperparameters: type: object properties: @@ -15734,7 +16169,7 @@ components: - lora_alpha - lora_rank - max_seq_length - FineTuneJobView: + FineTuneJobSummary: type: object properties: id: @@ -15771,28 +16206,13 @@ components: readOnly: true allOf: - $ref: '#/components/schemas/Hyperparameters' - dataset_id: - type: string - readOnly: true - output_location: - type: string - readOnly: true - description: 'Structured location of the job''s RW output folder: sf:/jobs//.' - checkpoint: - readOnly: true - description: Resolved checkpoint artifact (kind=checkpoint). Populated by - the future checkpoint-registration PR; null until then. - nullable: true required: - base_model - - checkpoint - created_at - - dataset_id - finished_at - hyperparameters - id - name - - output_location - started_at - status FineTuneJobList: @@ -15801,9 +16221,10 @@ components: jobs: type: array readOnly: true - description: List of fine-tuning jobs (FineTuneJobView projections). + description: "List of fine-tuning jobs (``FineTuneJobSummary`` projections\ + \ \u2014 without ``latest_checkpoint``; fetch the by-id endpoint for that)." items: - $ref: '#/components/schemas/FineTuneJobView' + $ref: '#/components/schemas/FineTuneJobSummary' prev_key: type: string readOnly: true @@ -15865,11 +16286,6 @@ components: type: string minLength: 1 description: Human-readable name for the fine-tuning job. - base_model: - type: string - minLength: 1 - description: Base model to fine-tune. Must be one of the platform's supported - models (see SUPPORTED_MODELS allow-list). dataset_id: type: string minLength: 1 @@ -15884,12 +16300,279 @@ components: minLength: 1 description: Saturn instance size to run the training pod on. Must be a GPU-equipped size (gpu > 0). + base_model: + type: string + default: null + minLength: 1 + description: "Base model to fine-tune a fresh adapter from. Must be one\ + \ of the platform's supported models (see SUPPORTED_MODELS allow-list).\ + \ Provide EITHER this OR ``source_checkpoint_artifact_id`` (exactly one).\ + \ Omit when continuing from a checkpoint \u2014 the base_model is then\ + \ derived from the checkpoint's metadata." + nullable: true + source_checkpoint_artifact_id: + type: string + default: null + minLength: 1 + description: Artifact id of an existing checkpoint to continue-train. Must + be a ``kind=checkpoint`` Artifact with ``status=ready`` belonging to the + same org as the requester. When set, training continues the SAME LoRA + adapter on the new dataset (weight-init continuation), and ``base_model`` + is derived from the checkpoint's metadata. Provide EITHER this OR ``base_model`` + (exactly one). + nullable: true + required: + - dataset_id + - hyperparameters + - instance_size + - name + FineTuneJobView: + type: object + properties: + id: + type: string + readOnly: true + description: Fine-tune job ID (same as the underlying deployment ID). + name: + type: string + readOnly: true + status: + type: string + readOnly: true + description: "Underlying Saturn job status: pending, running, stopping,\ + \ stopped, completed, or error. Same vocabulary as the rest of the platform\ + \ \u2014 TF intentionally does not translate to a product-specific set." + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + started_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + nullable: true + finished_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + nullable: true + base_model: + type: string + readOnly: true + hyperparameters: + readOnly: true + allOf: + - $ref: '#/components/schemas/Hyperparameters' + dataset_id: + type: string + readOnly: true + output_location: + type: string + readOnly: true + description: 'Structured location of the job''s RW output folder: sf://.' + latest_checkpoint: + readOnly: true + description: "Most recently-registered usable (``status=ready``) checkpoint\ + \ artifact (kind=checkpoint) whose ``producer.id`` matches this job's\ + \ deployment id. Null if no ready checkpoint exists \u2014 the job may\ + \ still be running, may have failed, or may have registered an error artifact\ + \ (``status=error``) which is deliberately NOT surfaced here. To diagnose\ + \ failures, read the job's training logs; the shim tees axolotl output\ + \ to ``/training.log``. Named ``latest_checkpoint`` rather\ + \ than ``checkpoint`` to leave room for future API surface exposing intermediate\ + \ per-epoch checkpoints (axolotl writes ``checkpoint-N/`` subdirs to NFS\ + \ during training, but those are not registered as separate Artifact rows\ + \ today). Only returned by the single-GET endpoint; list responses use\ + \ ``FineTuneJobSummary`` which omits this field." + allOf: + - $ref: '#/components/schemas/Artifact' + nullable: true required: - base_model + - created_at - dataset_id + - finished_at - hyperparameters + - id + - latest_checkpoint + - name + - output_location + - started_at + - status + InferenceEndpointSummary: + type: object + properties: + id: + type: string + readOnly: true + description: Inference endpoint ID (same as the underlying deployment ID). + name: + type: string + readOnly: true + status: + type: string + readOnly: true + description: 'Underlying Saturn deployment status: pending, running, stopping, + stopped, or error.' + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + base_model: + type: string + readOnly: true + description: HuggingFace base model id derived from the checkpoint Artifact's + ``metadata.base_model`` at create time. + checkpoint_artifact_id: + type: string + readOnly: true + description: Artifact id of the checkpoint this endpoint is serving. + instance_size: + type: string + readOnly: true + endpoint_url: + type: string + readOnly: true + description: "Public URL clients POST OpenAI-compatible inference requests\ + \ to. Uses the deployment's auto-generated subdomain. Returns the URL\ + \ regardless of running state \u2014 clients can stash it; calls fail\ + \ while the endpoint is stopped." + required: + - base_model + - checkpoint_artifact_id + - created_at + - endpoint_url + - id + - instance_size + - name + - status + InferenceEndpointList: + type: object + properties: + endpoints: + type: array + readOnly: true + description: "List of inference endpoints (``InferenceEndpointSummary``\ + \ projections \u2014 without ``checkpoint``; fetch the by-id endpoint\ + \ for that)." + items: + $ref: '#/components/schemas/InferenceEndpointSummary' + prev_key: + type: string + readOnly: true + description: Previous page key. + next_key: + type: string + readOnly: true + description: Next page key. + required: + - endpoints + InferenceEndpointCreate: + type: object + properties: + name: + type: string + minLength: 1 + description: Human-readable name for the inference endpoint. + checkpoint_artifact_id: + type: string + minLength: 1 + description: Artifact id of the checkpoint to serve. Must be a ``kind=checkpoint`` + Artifact with ``status=ready`` belonging to the same org as the requester. + instance_size: + type: string + minLength: 1 + description: Saturn instance size to run the inference pod on. Must be a + GPU-equipped size (gpu > 0). + quantization: + type: string + default: null + enum: + - fp8 + - int8 + - null + description: "Optional vLLM quantization method. Restricted to calibration-free\ + \ methods (``fp8``, ``int8``) \u2014 these quantize on the fly with no\ + \ calibration dataset. Calibration-requiring methods (gptq, awq) are rejected.\ + \ Omit (the default) to serve in the checkpoint's native precision (BF16)." + nullable: true + visibility: + type: string + default: org + enum: + - org + - owner + description: 'Route visibility enforced by ForwardAuth: ``org`` (any member + of the endpoint''s org may call it) or ``owner`` (only the owning identity + and explicit ``viewers``). Defaults to ``org``.' + viewers: + type: array + description: Optional list of identity names (usernames or group names in + the endpoint's org) granted access to the endpoint route in addition to + the owner. Honored by ForwardAuth exactly like a normal deployment's viewers. + items: + type: string + minLength: 1 + required: + - checkpoint_artifact_id + - instance_size + - name + InferenceEndpointView: + type: object + properties: + id: + type: string + readOnly: true + description: Inference endpoint ID (same as the underlying deployment ID). + name: + type: string + readOnly: true + status: + type: string + readOnly: true + description: 'Underlying Saturn deployment status: pending, running, stopping, + stopped, or error.' + created_at: + type: string + format: '%Y-%m-%dT%H:%M:%S+00:00' + readOnly: true + base_model: + type: string + readOnly: true + description: HuggingFace base model id derived from the checkpoint Artifact's + ``metadata.base_model`` at create time. + checkpoint_artifact_id: + type: string + readOnly: true + description: Artifact id of the checkpoint this endpoint is serving. + instance_size: + type: string + readOnly: true + endpoint_url: + type: string + readOnly: true + description: "Public URL clients POST OpenAI-compatible inference requests\ + \ to. Uses the deployment's auto-generated subdomain. Returns the URL\ + \ regardless of running state \u2014 clients can stash it; calls fail\ + \ while the endpoint is stopped." + checkpoint: + readOnly: true + description: Resolved checkpoint Artifact. Null only if the artifact was + deleted out from under the endpoint (we block that path; the field is + nullable defensively). + allOf: + - $ref: '#/components/schemas/Artifact' + nullable: true + required: + - base_model + - checkpoint + - checkpoint_artifact_id + - created_at + - endpoint_url + - id - instance_size - name + - status AggregatedUsage: type: object properties: @@ -17117,9 +17800,9 @@ components: disk_space: type: array readOnly: true - description: List of available disk space sizes. + description: Available disk space sizes. items: - type: string + $ref: '#/components/schemas/DiskSpaceOption' size: type: array readOnly: true diff --git a/docs/AppInfo.md b/docs/AppInfo.md index ecc128a..d4d09c6 100644 --- a/docs/AppInfo.md +++ b/docs/AppInfo.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **git_repo_clone_dir** | **str** | Default directory to clone git repositories into. | **app_serving_domain** | **str** | Root domain for deployment and workspace URLs. | **dind_enabled** | **bool** | True if docker-in-docker is enabled. | +**token_factory_enabled_global** | **bool** | Install-wide Token Factory switch (the global Settings flag). Per-org enablement is narrowed client-side against the active owner's usage-limit flag. | **apply_requires_confirm** | **bool** | True if recipe apply should be confirmed. | **hide_invitations** | **bool** | True if invitations are hidden in frontend. | **populate_examples** | **bool** | True if saturn examples are included. | diff --git a/docs/DatasetImportCreate.md b/docs/DatasetImportCreate.md new file mode 100644 index 0000000..bc7dda0 --- /dev/null +++ b/docs/DatasetImportCreate.md @@ -0,0 +1,32 @@ +# DatasetImportCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Human-readable name for the dataset. | +**hf_dataset_id** | **str** | Hugging Face dataset identifier, e.g. ``databricks/databricks-dolly-15k``. | +**split** | **str** | Hugging Face split to import (default: ``train``). | [optional] [default to 'train'] +**config_name** | **str** | Optional Hugging Face config/subset name. | [optional] + +## Example + +```python +from saturn_api.models.dataset_import_create import DatasetImportCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetImportCreate from a JSON string +dataset_import_create_instance = DatasetImportCreate.from_json(json) +# print the JSON string representation of the object +print(DatasetImportCreate.to_json()) + +# convert the object into a dict +dataset_import_create_dict = dataset_import_create_instance.to_dict() +# create an instance of DatasetImportCreate from a dict +dataset_import_create_from_dict = DatasetImportCreate.from_dict(dataset_import_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetLockCreate.md b/docs/DatasetLockCreate.md new file mode 100644 index 0000000..37f94c8 --- /dev/null +++ b/docs/DatasetLockCreate.md @@ -0,0 +1,32 @@ +# DatasetLockCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Human-readable name for the dataset. | +**shared_folder_id** | **str** | ID of the existing SharedFolder to lock and register as a dataset. | +**subpath** | **str** | Optional subpath within the folder where the dataset bytes live (e.g. ``data.jsonl`` or ``subdir/``). Defaults to the folder root. | [optional] +**metadata** | **Dict[str, object]** | Optional metadata blob (schema_type, row_count, etc.). | [optional] + +## Example + +```python +from saturn_api.models.dataset_lock_create import DatasetLockCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetLockCreate from a JSON string +dataset_lock_create_instance = DatasetLockCreate.from_json(json) +# print the JSON string representation of the object +print(DatasetLockCreate.to_json()) + +# convert the object into a dict +dataset_lock_create_dict = dataset_lock_create_instance.to_dict() +# create an instance of DatasetLockCreate from a dict +dataset_lock_create_from_dict = DatasetLockCreate.from_dict(dataset_lock_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetsApi.md b/docs/DatasetsApi.md index 46c0ee6..7d9171a 100644 --- a/docs/DatasetsApi.md +++ b/docs/DatasetsApi.md @@ -4,13 +4,97 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**call_import**](DatasetsApi.md#call_import) | **POST** /api/orgs/{org_id}/token-factory/datasets/import | Import dataset [**create**](DatasetsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/datasets | Create dataset [**delete**](DatasetsApi.md#delete) | **DELETE** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Delete dataset [**get**](DatasetsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/datasets/{dataset_id} | Get dataset [**list**](DatasetsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/datasets | List datasets +[**lock**](DatasetsApi.md#lock) | **POST** /api/orgs/{org_id}/token-factory/datasets/lock | Lock shared folder as dataset [**seal**](DatasetsApi.md#seal) | **POST** /api/orgs/{org_id}/token-factory/datasets/{dataset_id}/seal | Seal dataset +# **call_import** +> Dataset call_import(org_id, dataset_import_create=dataset_import_create) + +Import dataset + +Create a dataset in `assembling` state and launch a CPU job that downloads the given Hugging Face dataset, auto-detects its shape, normalises it to the canonical conversational format, and writes it into the org's tf-datasets folder. The job marks the dataset `ready` on success or `error` if the source format is not recognised. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.dataset import Dataset +from saturn_api.models.dataset_import_create import DatasetImportCreate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + dataset_import_create = saturn_api.DatasetImportCreate() # DatasetImportCreate | (optional) + + try: + # Import dataset + api_response = await api_instance.call_import(org_id, dataset_import_create=dataset_import_create) + print("The response of DatasetsApi->call_import:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->call_import: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **dataset_import_create** | [**DatasetImportCreate**](DatasetImportCreate.md)| | [optional] + +### Return type + +[**Dataset**](Dataset.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Import started | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create** > Dataset create(org_id, dataset_create) @@ -338,6 +422,88 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **lock** +> Dataset lock(org_id, dataset_lock_create=dataset_lock_create) + +Lock shared folder as dataset + +Register an existing SharedFolder (that already holds dataset bytes) as a dataset, zero-copy, by locking it to ReadOnlyMany. No job runs and nothing is copied; the dataset is immediately `ready` and its location points at the existing folder. The folder becomes read-only. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.dataset import Dataset +from saturn_api.models.dataset_lock_create import DatasetLockCreate +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.DatasetsApi(api_client) + org_id = 'org_id_example' # str | + dataset_lock_create = saturn_api.DatasetLockCreate() # DatasetLockCreate | (optional) + + try: + # Lock shared folder as dataset + api_response = await api_instance.lock(org_id, dataset_lock_create=dataset_lock_create) + print("The response of DatasetsApi->lock:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->lock: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **dataset_lock_create** | [**DatasetLockCreate**](DatasetLockCreate.md)| | [optional] + +### Return type + +[**Dataset**](Dataset.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Locked and registered | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **seal** > Dataset seal(org_id, dataset_id) diff --git a/docs/DiskSpaceOption.md b/docs/DiskSpaceOption.md new file mode 100644 index 0000000..1480ee6 --- /dev/null +++ b/docs/DiskSpaceOption.md @@ -0,0 +1,30 @@ +# DiskSpaceOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Kubernetes-style disk size (e.g. '100Gi') submitted when creating a resource. | [readonly] +**display_str** | **str** | Human-readable label shown in the picker. | [readonly] + +## Example + +```python +from saturn_api.models.disk_space_option import DiskSpaceOption + +# TODO update the JSON string below +json = "{}" +# create an instance of DiskSpaceOption from a JSON string +disk_space_option_instance = DiskSpaceOption.from_json(json) +# print the JSON string representation of the object +print(DiskSpaceOption.to_json()) + +# convert the object into a dict +disk_space_option_dict = disk_space_option_instance.to_dict() +# create an instance of DiskSpaceOption from a dict +disk_space_option_from_dict = DiskSpaceOption.from_dict(disk_space_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FineTuneJobCreate.md b/docs/FineTuneJobCreate.md index 56ff9eb..2ea2e00 100644 --- a/docs/FineTuneJobCreate.md +++ b/docs/FineTuneJobCreate.md @@ -6,10 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Human-readable name for the fine-tuning job. | -**base_model** | **str** | Base model to fine-tune. Must be one of the platform's supported models (see SUPPORTED_MODELS allow-list). | **dataset_id** | **str** | Identifier of a token-factory dataset artifact. The dataset must have status=READY and belong to the same org as the requester. | **hyperparameters** | [**Hyperparameters1**](Hyperparameters1.md) | Training hyperparameters. | **instance_size** | **str** | Saturn instance size to run the training pod on. Must be a GPU-equipped size (gpu > 0). | +**base_model** | **str** | Base model to fine-tune a fresh adapter from. Must be one of the platform's supported models (see SUPPORTED_MODELS allow-list). Provide EITHER this OR ``source_checkpoint_artifact_id`` (exactly one). Omit when continuing from a checkpoint — the base_model is then derived from the checkpoint's metadata. | [optional] +**source_checkpoint_artifact_id** | **str** | Artifact id of an existing checkpoint to continue-train. Must be a ``kind=checkpoint`` Artifact with ``status=ready`` belonging to the same org as the requester. When set, training continues the SAME LoRA adapter on the new dataset (weight-init continuation), and ``base_model`` is derived from the checkpoint's metadata. Provide EITHER this OR ``base_model`` (exactly one). | [optional] ## Example diff --git a/docs/FineTuneJobList.md b/docs/FineTuneJobList.md index d3ff0b2..de2b721 100644 --- a/docs/FineTuneJobList.md +++ b/docs/FineTuneJobList.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**jobs** | [**List[FineTuneJobView]**](FineTuneJobView.md) | List of fine-tuning jobs (FineTuneJobView projections). | [readonly] +**jobs** | [**List[FineTuneJobSummary]**](FineTuneJobSummary.md) | List of fine-tuning jobs (``FineTuneJobSummary`` projections — without ``latest_checkpoint``; fetch the by-id endpoint for that). | [readonly] **prev_key** | **str** | Previous page key. | [optional] [readonly] **next_key** | **str** | Next page key. | [optional] [readonly] diff --git a/docs/FineTuneJobSummary.md b/docs/FineTuneJobSummary.md new file mode 100644 index 0000000..d00351d --- /dev/null +++ b/docs/FineTuneJobSummary.md @@ -0,0 +1,36 @@ +# FineTuneJobSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Fine-tune job ID (same as the underlying deployment ID). | [readonly] +**name** | **str** | | [readonly] +**status** | **str** | Underlying Saturn job status: pending, running, stopping, stopped, completed, or error. Same vocabulary as the rest of the platform — TF intentionally does not translate to a product-specific set. | [readonly] +**created_at** | **str** | | [readonly] +**started_at** | **str** | | [readonly] +**finished_at** | **str** | | [readonly] +**base_model** | **str** | | [readonly] +**hyperparameters** | [**Hyperparameters**](Hyperparameters.md) | | [readonly] + +## Example + +```python +from saturn_api.models.fine_tune_job_summary import FineTuneJobSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of FineTuneJobSummary from a JSON string +fine_tune_job_summary_instance = FineTuneJobSummary.from_json(json) +# print the JSON string representation of the object +print(FineTuneJobSummary.to_json()) + +# convert the object into a dict +fine_tune_job_summary_dict = fine_tune_job_summary_instance.to_dict() +# create an instance of FineTuneJobSummary from a dict +fine_tune_job_summary_from_dict = FineTuneJobSummary.from_dict(fine_tune_job_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FineTuneJobView.md b/docs/FineTuneJobView.md index 85c72c4..99fee3a 100644 --- a/docs/FineTuneJobView.md +++ b/docs/FineTuneJobView.md @@ -14,8 +14,8 @@ Name | Type | Description | Notes **base_model** | **str** | | [readonly] **hyperparameters** | [**Hyperparameters**](Hyperparameters.md) | | [readonly] **dataset_id** | **str** | | [readonly] -**output_location** | **str** | Structured location of the job's RW output folder: sf:<tf-jobs-folder-id>/jobs/<job-id>/. | [readonly] -**checkpoint** | **object** | Resolved checkpoint artifact (kind=checkpoint). Populated by the future checkpoint-registration PR; null until then. | [readonly] +**output_location** | **str** | Structured location of the job's RW output folder: sf:<tf-jobs-folder-id>/<job-id>/. | [readonly] +**latest_checkpoint** | [**Artifact**](Artifact.md) | Most recently-registered usable (``status=ready``) checkpoint artifact (kind=checkpoint) whose ``producer.id`` matches this job's deployment id. Null if no ready checkpoint exists — the job may still be running, may have failed, or may have registered an error artifact (``status=error``) which is deliberately NOT surfaced here. To diagnose failures, read the job's training logs; the shim tees axolotl output to ``<output_dir>/training.log``. Named ``latest_checkpoint`` rather than ``checkpoint`` to leave room for future API surface exposing intermediate per-epoch checkpoints (axolotl writes ``checkpoint-N/`` subdirs to NFS during training, but those are not registered as separate Artifact rows today). Only returned by the single-GET endpoint; list responses use ``FineTuneJobSummary`` which omits this field. | [readonly] ## Example diff --git a/docs/FineTuningJobsApi.md b/docs/FineTuningJobsApi.md index 4c70c91..e1dbe77 100644 --- a/docs/FineTuningJobsApi.md +++ b/docs/FineTuningJobsApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](FineTuningJobsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | Create fine-tuning job [**get**](FineTuningJobsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id} | Get fine-tuning job +[**get_logs**](FineTuningJobsApi.md#get_logs) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/logs | Get fine-tuning job historical logs [**jobs_cancel**](FineTuningJobsApi.md#jobs_cancel) | **POST** /api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/cancel | Cancel fine-tuning job [**list**](FineTuningJobsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/fine-tuning/jobs | List fine-tuning jobs @@ -171,6 +172,96 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_logs** +> HistoricLogList get_logs(org_id, job_id, pod_name=pod_name, cluster=cluster, prev_key=prev_key, next_key=next_key, page_size=page_size) + +Get fine-tuning job historical logs + +Historical record of logs from the resource. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.historic_log_list import HistoricLogList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.FineTuningJobsApi(api_client) + org_id = 'org_id_example' # str | + job_id = 'job_id_example' # str | + pod_name = 'pod_name_example' # str | Name of the pod to retrieve logs from. (optional) + cluster = 'cluster_example' # str | Name of the cluster the pod lives in. (optional) + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Maximum number of results per page. (optional) (default to 100) + + try: + # Get fine-tuning job historical logs + api_response = await api_instance.get_logs(org_id, job_id, pod_name=pod_name, cluster=cluster, prev_key=prev_key, next_key=next_key, page_size=page_size) + print("The response of FineTuningJobsApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FineTuningJobsApi->get_logs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **job_id** | **str**| | + **pod_name** | **str**| Name of the pod to retrieve logs from. | [optional] + **cluster** | **str**| Name of the cluster the pod lives in. | [optional] + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Maximum number of results per page. | [optional] [default to 100] + +### Return type + +[**HistoricLogList**](HistoricLogList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **jobs_cancel** > FineTuneJobView jobs_cancel(org_id, job_id) diff --git a/docs/InferenceEndpointCreate.md b/docs/InferenceEndpointCreate.md new file mode 100644 index 0000000..7093a60 --- /dev/null +++ b/docs/InferenceEndpointCreate.md @@ -0,0 +1,34 @@ +# InferenceEndpointCreate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Human-readable name for the inference endpoint. | +**checkpoint_artifact_id** | **str** | Artifact id of the checkpoint to serve. Must be a ``kind=checkpoint`` Artifact with ``status=ready`` belonging to the same org as the requester. | +**instance_size** | **str** | Saturn instance size to run the inference pod on. Must be a GPU-equipped size (gpu > 0). | +**quantization** | **str** | Optional vLLM quantization method. Restricted to calibration-free methods (``fp8``, ``int8``) — these quantize on the fly with no calibration dataset. Calibration-requiring methods (gptq, awq) are rejected. Omit (the default) to serve in the checkpoint's native precision (BF16). | [optional] +**visibility** | **str** | Route visibility enforced by ForwardAuth: ``org`` (any member of the endpoint's org may call it) or ``owner`` (only the owning identity and explicit ``viewers``). Defaults to ``org``. | [optional] [default to 'org'] +**viewers** | **List[str]** | Optional list of identity names (usernames or group names in the endpoint's org) granted access to the endpoint route in addition to the owner. Honored by ForwardAuth exactly like a normal deployment's viewers. | [optional] + +## Example + +```python +from saturn_api.models.inference_endpoint_create import InferenceEndpointCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of InferenceEndpointCreate from a JSON string +inference_endpoint_create_instance = InferenceEndpointCreate.from_json(json) +# print the JSON string representation of the object +print(InferenceEndpointCreate.to_json()) + +# convert the object into a dict +inference_endpoint_create_dict = inference_endpoint_create_instance.to_dict() +# create an instance of InferenceEndpointCreate from a dict +inference_endpoint_create_from_dict = InferenceEndpointCreate.from_dict(inference_endpoint_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InferenceEndpointList.md b/docs/InferenceEndpointList.md new file mode 100644 index 0000000..46290c5 --- /dev/null +++ b/docs/InferenceEndpointList.md @@ -0,0 +1,31 @@ +# InferenceEndpointList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoints** | [**List[InferenceEndpointSummary]**](InferenceEndpointSummary.md) | List of inference endpoints (``InferenceEndpointSummary`` projections — without ``checkpoint``; fetch the by-id endpoint for that). | [readonly] +**prev_key** | **str** | Previous page key. | [optional] [readonly] +**next_key** | **str** | Next page key. | [optional] [readonly] + +## Example + +```python +from saturn_api.models.inference_endpoint_list import InferenceEndpointList + +# TODO update the JSON string below +json = "{}" +# create an instance of InferenceEndpointList from a JSON string +inference_endpoint_list_instance = InferenceEndpointList.from_json(json) +# print the JSON string representation of the object +print(InferenceEndpointList.to_json()) + +# convert the object into a dict +inference_endpoint_list_dict = inference_endpoint_list_instance.to_dict() +# create an instance of InferenceEndpointList from a dict +inference_endpoint_list_from_dict = InferenceEndpointList.from_dict(inference_endpoint_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InferenceEndpointSummary.md b/docs/InferenceEndpointSummary.md new file mode 100644 index 0000000..589a22a --- /dev/null +++ b/docs/InferenceEndpointSummary.md @@ -0,0 +1,36 @@ +# InferenceEndpointSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Inference endpoint ID (same as the underlying deployment ID). | [readonly] +**name** | **str** | | [readonly] +**status** | **str** | Underlying Saturn deployment status: pending, running, stopping, stopped, or error. | [readonly] +**created_at** | **str** | | [readonly] +**base_model** | **str** | HuggingFace base model id derived from the checkpoint Artifact's ``metadata.base_model`` at create time. | [readonly] +**checkpoint_artifact_id** | **str** | Artifact id of the checkpoint this endpoint is serving. | [readonly] +**instance_size** | **str** | | [readonly] +**endpoint_url** | **str** | Public URL clients POST OpenAI-compatible inference requests to. Uses the deployment's auto-generated subdomain. Returns the URL regardless of running state — clients can stash it; calls fail while the endpoint is stopped. | [readonly] + +## Example + +```python +from saturn_api.models.inference_endpoint_summary import InferenceEndpointSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of InferenceEndpointSummary from a JSON string +inference_endpoint_summary_instance = InferenceEndpointSummary.from_json(json) +# print the JSON string representation of the object +print(InferenceEndpointSummary.to_json()) + +# convert the object into a dict +inference_endpoint_summary_dict = inference_endpoint_summary_instance.to_dict() +# create an instance of InferenceEndpointSummary from a dict +inference_endpoint_summary_from_dict = InferenceEndpointSummary.from_dict(inference_endpoint_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InferenceEndpointView.md b/docs/InferenceEndpointView.md new file mode 100644 index 0000000..4c8dedc --- /dev/null +++ b/docs/InferenceEndpointView.md @@ -0,0 +1,37 @@ +# InferenceEndpointView + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Inference endpoint ID (same as the underlying deployment ID). | [readonly] +**name** | **str** | | [readonly] +**status** | **str** | Underlying Saturn deployment status: pending, running, stopping, stopped, or error. | [readonly] +**created_at** | **str** | | [readonly] +**base_model** | **str** | HuggingFace base model id derived from the checkpoint Artifact's ``metadata.base_model`` at create time. | [readonly] +**checkpoint_artifact_id** | **str** | Artifact id of the checkpoint this endpoint is serving. | [readonly] +**instance_size** | **str** | | [readonly] +**endpoint_url** | **str** | Public URL clients POST OpenAI-compatible inference requests to. Uses the deployment's auto-generated subdomain. Returns the URL regardless of running state — clients can stash it; calls fail while the endpoint is stopped. | [readonly] +**checkpoint** | [**Artifact**](Artifact.md) | Resolved checkpoint Artifact. Null only if the artifact was deleted out from under the endpoint (we block that path; the field is nullable defensively). | [readonly] + +## Example + +```python +from saturn_api.models.inference_endpoint_view import InferenceEndpointView + +# TODO update the JSON string below +json = "{}" +# create an instance of InferenceEndpointView from a JSON string +inference_endpoint_view_instance = InferenceEndpointView.from_json(json) +# print the JSON string representation of the object +print(InferenceEndpointView.to_json()) + +# convert the object into a dict +inference_endpoint_view_dict = inference_endpoint_view_instance.to_dict() +# create an instance of InferenceEndpointView from a dict +inference_endpoint_view_from_dict = InferenceEndpointView.from_dict(inference_endpoint_view_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InferenceEndpointsApi.md b/docs/InferenceEndpointsApi.md new file mode 100644 index 0000000..233c728 --- /dev/null +++ b/docs/InferenceEndpointsApi.md @@ -0,0 +1,589 @@ +# saturn_api.InferenceEndpointsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](InferenceEndpointsApi.md#create) | **POST** /api/orgs/{org_id}/token-factory/inference-endpoints | Create inference endpoint +[**delete**](InferenceEndpointsApi.md#delete) | **DELETE** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id} | Delete inference endpoint +[**endpoints_start**](InferenceEndpointsApi.md#endpoints_start) | **POST** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/start | Start inference endpoint +[**endpoints_stop**](InferenceEndpointsApi.md#endpoints_stop) | **POST** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/stop | Stop inference endpoint +[**get**](InferenceEndpointsApi.md#get) | **GET** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id} | Get inference endpoint +[**get_logs**](InferenceEndpointsApi.md#get_logs) | **GET** /api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/logs | Get inference endpoint historical logs +[**list**](InferenceEndpointsApi.md#list) | **GET** /api/orgs/{org_id}/token-factory/inference-endpoints | List inference endpoints + + +# **create** +> InferenceEndpointView create(org_id, inference_endpoint_create) + +Create inference endpoint + +Create a new inference endpoint. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.inference_endpoint_create import InferenceEndpointCreate +from saturn_api.models.inference_endpoint_view import InferenceEndpointView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + inference_endpoint_create = saturn_api.InferenceEndpointCreate() # InferenceEndpointCreate | + + try: + # Create inference endpoint + api_response = await api_instance.create(org_id, inference_endpoint_create) + print("The response of InferenceEndpointsApi->create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **inference_endpoint_create** | [**InferenceEndpointCreate**](InferenceEndpointCreate.md)| | + +### Return type + +[**InferenceEndpointView**](InferenceEndpointView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> delete(org_id, endpoint_id) + +Delete inference endpoint + +Delete an inference endpoint. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + endpoint_id = 'endpoint_id_example' # str | + + try: + # Delete inference endpoint + await api_instance.delete(org_id, endpoint_id) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **endpoint_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **endpoints_start** +> InferenceEndpointView endpoints_start(org_id, endpoint_id) + +Start inference endpoint + +Bring up the underlying persistent deployment. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.inference_endpoint_view import InferenceEndpointView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + endpoint_id = 'endpoint_id_example' # str | + + try: + # Start inference endpoint + api_response = await api_instance.endpoints_start(org_id, endpoint_id) + print("The response of InferenceEndpointsApi->endpoints_start:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->endpoints_start: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **endpoint_id** | **str**| | + +### Return type + +[**InferenceEndpointView**](InferenceEndpointView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Started | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **endpoints_stop** +> InferenceEndpointView endpoints_stop(org_id, endpoint_id) + +Stop inference endpoint + +Tear down the pod but keep the DB row. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.inference_endpoint_view import InferenceEndpointView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + endpoint_id = 'endpoint_id_example' # str | + + try: + # Stop inference endpoint + api_response = await api_instance.endpoints_stop(org_id, endpoint_id) + print("The response of InferenceEndpointsApi->endpoints_stop:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->endpoints_stop: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **endpoint_id** | **str**| | + +### Return type + +[**InferenceEndpointView**](InferenceEndpointView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Stopped | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> InferenceEndpointView get(org_id, endpoint_id) + +Get inference endpoint + +Get an inference endpoint. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.inference_endpoint_view import InferenceEndpointView +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + endpoint_id = 'endpoint_id_example' # str | + + try: + # Get inference endpoint + api_response = await api_instance.get(org_id, endpoint_id) + print("The response of InferenceEndpointsApi->get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **endpoint_id** | **str**| | + +### Return type + +[**InferenceEndpointView**](InferenceEndpointView.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_logs** +> HistoricLogList get_logs(org_id, endpoint_id, pod_name=pod_name, cluster=cluster, prev_key=prev_key, next_key=next_key, page_size=page_size) + +Get inference endpoint historical logs + +Historical record of logs from the resource. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.historic_log_list import HistoricLogList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + endpoint_id = 'endpoint_id_example' # str | + pod_name = 'pod_name_example' # str | Name of the pod to retrieve logs from. (optional) + cluster = 'cluster_example' # str | Name of the cluster the pod lives in. (optional) + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Maximum number of results per page. (optional) (default to 100) + + try: + # Get inference endpoint historical logs + api_response = await api_instance.get_logs(org_id, endpoint_id, pod_name=pod_name, cluster=cluster, prev_key=prev_key, next_key=next_key, page_size=page_size) + print("The response of InferenceEndpointsApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->get_logs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **endpoint_id** | **str**| | + **pod_name** | **str**| Name of the pod to retrieve logs from. | [optional] + **cluster** | **str**| Name of the cluster the pod lives in. | [optional] + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Maximum number of results per page. | [optional] [default to 100] + +### Return type + +[**HistoricLogList**](HistoricLogList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> InferenceEndpointList list(org_id, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + +List inference endpoints + +Paginated list of inference endpoints. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import saturn_api +from saturn_api.models.inference_endpoint_list import InferenceEndpointList +from saturn_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to the SATURN_BASE_URL env or http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = saturn_api.Configuration( + host = os.getenv("SATURN_BASE_URL", "http://localhost") +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth, defaults to the SATURN_TOKEN env +configuration = saturn_api.Configuration( + access_token = os.environ["SATURN_TOKEN"] +) + +# Enter a context with an instance of the API client +async with saturn_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saturn_api.InferenceEndpointsApi(api_client) + org_id = 'org_id_example' # str | + prev_key = 'prev_key_example' # str | Previous page key. (optional) + next_key = 'next_key_example' # str | Next page key. (optional) + page_size = 100 # int | Page size. (optional) (default to 100) + descending = False # bool | List results in descending order. (optional) (default to False) + + try: + # List inference endpoints + api_response = await api_instance.list(org_id, prev_key=prev_key, next_key=next_key, page_size=page_size, descending=descending) + print("The response of InferenceEndpointsApi->list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InferenceEndpointsApi->list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org_id** | **str**| | + **prev_key** | **str**| Previous page key. | [optional] + **next_key** | **str**| Next page key. | [optional] + **page_size** | **int**| Page size. | [optional] [default to 100] + **descending** | **bool**| List results in descending order. | [optional] [default to False] + +### Return type + +[**InferenceEndpointList**](InferenceEndpointList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ServerOptions.md b/docs/ServerOptions.md index c2c141e..f7e6563 100644 --- a/docs/ServerOptions.md +++ b/docs/ServerOptions.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auto_shutoff** | **List[str]** | List of available auto-shutoff settings for workspaces. | [readonly] -**disk_space** | **List[str]** | List of available disk sizes for workspaces. | [readonly] +**disk_space** | [**List[DiskSpaceOption]**](DiskSpaceOption.md) | Available disk sizes for workspaces. | [readonly] **sizes** | [**Dict[str, InstanceSize]**](InstanceSize.md) | Mapping of instance size names to their configurations. | [readonly] ## Example diff --git a/docs/UsageLimits.md b/docs/UsageLimits.md index a10cddb..5ff08bc 100644 --- a/docs/UsageLimits.md +++ b/docs/UsageLimits.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **is_default** | **bool** | Default usage limit for the org. | [readonly] **instance_sizes** | **List[str]** | Allowed instance sizes. Null if no limits. | [readonly] **resource_types** | **List[str]** | Allowed resource types. Null if no limits. | [readonly] +**token_factory_enabled** | **bool** | Whether Token Factory is available under this limit. Null inherits the global setting; False hard-disables it. | [readonly] **num_instances** | **int** | Maximum number of active instances. Null if no limits. | [readonly] **auto_shutoff** | **int** | Maximum allowed auto-shutoff. Null if no limits. | [readonly] **storage_in_gb** | **int** | Total allowed storage in GiB. Null if no limits. | [readonly] diff --git a/docs/UsageLimitsCreate.md b/docs/UsageLimitsCreate.md index 5849e9e..a4f091b 100644 --- a/docs/UsageLimitsCreate.md +++ b/docs/UsageLimitsCreate.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **is_default** | **bool** | Default usage limit for the org. | [optional] [default to False] **instance_sizes** | **List[str]** | Allowed instance sizes. Null if no limits. | [optional] **resource_types** | **List[str]** | Allowed resource types. Null if no limits. | [optional] +**token_factory_enabled** | **bool** | Whether Token Factory is available under this limit. Null inherits the global setting; False hard-disables it. | [optional] **num_instances** | **int** | Maximum number of active instances. Null if no limits. | [optional] **auto_shutoff** | **int** | Maximum allowed auto-shutoff. Null if no limits. | [optional] **storage_in_gb** | **int** | Total allowed storage in GiB. Null if no limits. | [optional] diff --git a/docs/UsageLimitsUpdate.md b/docs/UsageLimitsUpdate.md index d73d68b..3014282 100644 --- a/docs/UsageLimitsUpdate.md +++ b/docs/UsageLimitsUpdate.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **is_default** | **bool** | Default usage limit for the org. | [optional] **instance_sizes** | **List[str]** | Allowed instance sizes. Null if no limits. | [optional] **resource_types** | **List[str]** | Allowed resource types. Null if no limits. | [optional] +**token_factory_enabled** | **bool** | Whether Token Factory is available under this limit. Null inherits the global setting; False hard-disables it. | [optional] **num_instances** | **int** | Maximum number of active instances. Null if no limits. | [optional] **auto_shutoff** | **int** | Maximum allowed auto-shutoff. Null if no limits. | [optional] **storage_in_gb** | **int** | Total allowed storage in GiB. Null if no limits. | [optional] diff --git a/docs/WorkspaceServerOptions.md b/docs/WorkspaceServerOptions.md index 6caf76b..1bb817e 100644 --- a/docs/WorkspaceServerOptions.md +++ b/docs/WorkspaceServerOptions.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auto_shutoff** | **List[str]** | List of available auto-shutoff settings. | [readonly] -**disk_space** | **List[str]** | List of available disk space sizes. | [readonly] +**disk_space** | [**List[DiskSpaceOption]**](DiskSpaceOption.md) | Available disk space sizes. | [readonly] **size** | [**List[InstanceSize]**](InstanceSize.md) | List of available instance sizes. | [readonly] ## Example diff --git a/requirements.txt b/requirements.txt index e8de160..ef5088f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ python_dateutil >= 2.8.2 -httpx = ">= 0.28.1" +httpx >= 0.28.1 pydantic >= 2.11 typing-extensions >= 4.7.1 diff --git a/saturn_api/__init__.py b/saturn_api/__init__.py index 6e5e018..cc73703 100644 --- a/saturn_api/__init__.py +++ b/saturn_api/__init__.py @@ -33,6 +33,7 @@ "GroupsApi", "ImageTagsApi", "ImagesApi", + "InferenceEndpointsApi", "InfoApi", "InvitationsApi", "JobsApi", @@ -113,7 +114,9 @@ "DataPoint", "Dataset", "DatasetCreate", + "DatasetImportCreate", "DatasetList", + "DatasetLockCreate", "DefaultImages", "DefaultSizes", "Deployment", @@ -127,6 +130,7 @@ "DeploymentStart", "DeploymentStatus", "DeploymentUpdate", + "DiskSpaceOption", "ExternalRepo", "ExternalRepoAttachment", "ExternalRepoAttachmentCreate", @@ -144,6 +148,7 @@ "ExtraPackagesRecipePip", "FineTuneJobCreate", "FineTuneJobList", + "FineTuneJobSummary", "FineTuneJobView", "Group", "GroupCreate", @@ -183,6 +188,10 @@ "ImageTagState", "ImageTagUpdate", "ImageUpdate", + "InferenceEndpointCreate", + "InferenceEndpointList", + "InferenceEndpointSummary", + "InferenceEndpointView", "InstanceSize", "Invitation", "InvitationCreate", @@ -382,6 +391,9 @@ from saturn_api.api.groups_api import GroupsApi as GroupsApi from saturn_api.api.image_tags_api import ImageTagsApi as ImageTagsApi from saturn_api.api.images_api import ImagesApi as ImagesApi +from saturn_api.api.inference_endpoints_api import ( + InferenceEndpointsApi as InferenceEndpointsApi, +) from saturn_api.api.info_api import InfoApi as InfoApi from saturn_api.api.invitations_api import InvitationsApi as InvitationsApi from saturn_api.api.jobs_api import JobsApi as JobsApi @@ -500,7 +512,11 @@ from saturn_api.models.data_point import DataPoint as DataPoint from saturn_api.models.dataset import Dataset as Dataset from saturn_api.models.dataset_create import DatasetCreate as DatasetCreate +from saturn_api.models.dataset_import_create import ( + DatasetImportCreate as DatasetImportCreate, +) from saturn_api.models.dataset_list import DatasetList as DatasetList +from saturn_api.models.dataset_lock_create import DatasetLockCreate as DatasetLockCreate from saturn_api.models.default_images import DefaultImages as DefaultImages from saturn_api.models.default_sizes import DefaultSizes as DefaultSizes from saturn_api.models.deployment import Deployment as Deployment @@ -520,6 +536,7 @@ from saturn_api.models.deployment_start import DeploymentStart as DeploymentStart from saturn_api.models.deployment_status import DeploymentStatus as DeploymentStatus from saturn_api.models.deployment_update import DeploymentUpdate as DeploymentUpdate +from saturn_api.models.disk_space_option import DiskSpaceOption as DiskSpaceOption from saturn_api.models.external_repo import ExternalRepo as ExternalRepo from saturn_api.models.external_repo_attachment import ( ExternalRepoAttachment as ExternalRepoAttachment, @@ -563,6 +580,9 @@ FineTuneJobCreate as FineTuneJobCreate, ) from saturn_api.models.fine_tune_job_list import FineTuneJobList as FineTuneJobList +from saturn_api.models.fine_tune_job_summary import ( + FineTuneJobSummary as FineTuneJobSummary, +) from saturn_api.models.fine_tune_job_view import FineTuneJobView as FineTuneJobView from saturn_api.models.group import Group as Group from saturn_api.models.group_create import GroupCreate as GroupCreate @@ -608,6 +628,18 @@ from saturn_api.models.image_tag_state import ImageTagState as ImageTagState from saturn_api.models.image_tag_update import ImageTagUpdate as ImageTagUpdate from saturn_api.models.image_update import ImageUpdate as ImageUpdate +from saturn_api.models.inference_endpoint_create import ( + InferenceEndpointCreate as InferenceEndpointCreate, +) +from saturn_api.models.inference_endpoint_list import ( + InferenceEndpointList as InferenceEndpointList, +) +from saturn_api.models.inference_endpoint_summary import ( + InferenceEndpointSummary as InferenceEndpointSummary, +) +from saturn_api.models.inference_endpoint_view import ( + InferenceEndpointView as InferenceEndpointView, +) from saturn_api.models.instance_size import InstanceSize as InstanceSize from saturn_api.models.invitation import Invitation as Invitation from saturn_api.models.invitation_create import InvitationCreate as InvitationCreate diff --git a/saturn_api/api/__init__.py b/saturn_api/api/__init__.py index 283362b..2c09dfc 100644 --- a/saturn_api/api/__init__.py +++ b/saturn_api/api/__init__.py @@ -17,6 +17,7 @@ from saturn_api.api.groups_api import GroupsApi from saturn_api.api.image_tags_api import ImageTagsApi from saturn_api.api.images_api import ImagesApi +from saturn_api.api.inference_endpoints_api import InferenceEndpointsApi from saturn_api.api.info_api import InfoApi from saturn_api.api.invitations_api import InvitationsApi from saturn_api.api.jobs_api import JobsApi diff --git a/saturn_api/api/datasets_api.py b/saturn_api/api/datasets_api.py index ef8e890..fdc8107 100644 --- a/saturn_api/api/datasets_api.py +++ b/saturn_api/api/datasets_api.py @@ -19,7 +19,9 @@ from saturn_api.models.artifact_status import ArtifactStatus from saturn_api.models.dataset import Dataset from saturn_api.models.dataset_create import DatasetCreate +from saturn_api.models.dataset_import_create import DatasetImportCreate from saturn_api.models.dataset_list import DatasetList +from saturn_api.models.dataset_lock_create import DatasetLockCreate from saturn_api.rest import RESTResponseType @@ -35,6 +37,255 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call + async def call_import( + self, + org_id: StrictStr, + dataset_import_create: Optional[DatasetImportCreate] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dataset: + """Import dataset + + Create a dataset in `assembling` state and launch a CPU job that downloads the given Hugging Face dataset, auto-detects its shape, normalises it to the canonical conversational format, and writes it into the org's tf-datasets folder. The job marks the dataset `ready` on success or `error` if the source format is not recognised. + + :param org_id: (required) + :type org_id: str + :param dataset_import_create: + :type dataset_import_create: DatasetImportCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._call_import_serialize( + org_id=org_id, + dataset_import_create=dataset_import_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def call_import_with_http_info( + self, + org_id: StrictStr, + dataset_import_create: Optional[DatasetImportCreate] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dataset]: + """Import dataset + + Create a dataset in `assembling` state and launch a CPU job that downloads the given Hugging Face dataset, auto-detects its shape, normalises it to the canonical conversational format, and writes it into the org's tf-datasets folder. The job marks the dataset `ready` on success or `error` if the source format is not recognised. + + :param org_id: (required) + :type org_id: str + :param dataset_import_create: + :type dataset_import_create: DatasetImportCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._call_import_serialize( + org_id=org_id, + dataset_import_create=dataset_import_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def call_import_without_preload_content( + self, + org_id: StrictStr, + dataset_import_create: Optional[DatasetImportCreate] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Import dataset + + Create a dataset in `assembling` state and launch a CPU job that downloads the given Hugging Face dataset, auto-detects its shape, normalises it to the canonical conversational format, and writes it into the org's tf-datasets folder. The job marks the dataset `ready` on success or `error` if the source format is not recognised. + + :param org_id: (required) + :type org_id: str + :param dataset_import_create: + :type dataset_import_create: DatasetImportCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._call_import_serialize( + org_id=org_id, + dataset_import_create=dataset_import_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_import_serialize( + self, + org_id, + dataset_import_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if dataset_import_create is not None: + _body_params = dataset_import_create + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/datasets/import", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call async def create( self, @@ -1094,6 +1345,255 @@ def _list_serialize( _request_auth=_request_auth, ) + @validate_call + async def lock( + self, + org_id: StrictStr, + dataset_lock_create: Optional[DatasetLockCreate] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dataset: + """Lock shared folder as dataset + + Register an existing SharedFolder (that already holds dataset bytes) as a dataset, zero-copy, by locking it to ReadOnlyMany. No job runs and nothing is copied; the dataset is immediately `ready` and its location points at the existing folder. The folder becomes read-only. + + :param org_id: (required) + :type org_id: str + :param dataset_lock_create: + :type dataset_lock_create: DatasetLockCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._lock_serialize( + org_id=org_id, + dataset_lock_create=dataset_lock_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def lock_with_http_info( + self, + org_id: StrictStr, + dataset_lock_create: Optional[DatasetLockCreate] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dataset]: + """Lock shared folder as dataset + + Register an existing SharedFolder (that already holds dataset bytes) as a dataset, zero-copy, by locking it to ReadOnlyMany. No job runs and nothing is copied; the dataset is immediately `ready` and its location points at the existing folder. The folder becomes read-only. + + :param org_id: (required) + :type org_id: str + :param dataset_lock_create: + :type dataset_lock_create: DatasetLockCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._lock_serialize( + org_id=org_id, + dataset_lock_create=dataset_lock_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def lock_without_preload_content( + self, + org_id: StrictStr, + dataset_lock_create: Optional[DatasetLockCreate] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Lock shared folder as dataset + + Register an existing SharedFolder (that already holds dataset bytes) as a dataset, zero-copy, by locking it to ReadOnlyMany. No job runs and nothing is copied; the dataset is immediately `ready` and its location points at the existing folder. The folder becomes read-only. + + :param org_id: (required) + :type org_id: str + :param dataset_lock_create: + :type dataset_lock_create: DatasetLockCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._lock_serialize( + org_id=org_id, + dataset_lock_create=dataset_lock_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Dataset", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _lock_serialize( + self, + org_id, + dataset_lock_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if dataset_lock_create is not None: + _body_params = dataset_lock_create + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/datasets/lock", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call async def seal( self, diff --git a/saturn_api/api/fine_tuning_jobs_api.py b/saturn_api/api/fine_tuning_jobs_api.py index 1bd58a6..3c54d95 100644 --- a/saturn_api/api/fine_tuning_jobs_api.py +++ b/saturn_api/api/fine_tuning_jobs_api.py @@ -19,6 +19,7 @@ from saturn_api.models.fine_tune_job_create import FineTuneJobCreate from saturn_api.models.fine_tune_job_list import FineTuneJobList from saturn_api.models.fine_tune_job_view import FineTuneJobView +from saturn_api.models.historic_log_list import HistoricLogList from saturn_api.rest import RESTResponseType @@ -524,6 +525,353 @@ def _get_serialize( _request_auth=_request_auth, ) + @validate_call + async def get_logs( + self, + org_id: StrictStr, + job_id: StrictStr, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HistoricLogList: + """Get fine-tuning job historical logs + + Historical record of logs from the resource. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param pod_name: Name of the pod to retrieve logs from. + :type pod_name: str + :param cluster: Name of the cluster the pod lives in. + :type cluster: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Maximum number of results per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_logs_serialize( + org_id=org_id, + job_id=job_id, + pod_name=pod_name, + cluster=cluster, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "HistoricLogList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def get_logs_with_http_info( + self, + org_id: StrictStr, + job_id: StrictStr, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HistoricLogList]: + """Get fine-tuning job historical logs + + Historical record of logs from the resource. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param pod_name: Name of the pod to retrieve logs from. + :type pod_name: str + :param cluster: Name of the cluster the pod lives in. + :type cluster: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Maximum number of results per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_logs_serialize( + org_id=org_id, + job_id=job_id, + pod_name=pod_name, + cluster=cluster, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "HistoricLogList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def get_logs_without_preload_content( + self, + org_id: StrictStr, + job_id: StrictStr, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get fine-tuning job historical logs + + Historical record of logs from the resource. + + :param org_id: (required) + :type org_id: str + :param job_id: (required) + :type job_id: str + :param pod_name: Name of the pod to retrieve logs from. + :type pod_name: str + :param cluster: Name of the cluster the pod lives in. + :type cluster: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Maximum number of results per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_logs_serialize( + org_id=org_id, + job_id=job_id, + pod_name=pod_name, + cluster=cluster, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "HistoricLogList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_logs_serialize( + self, + org_id, + job_id, + pod_name, + cluster, + prev_key, + next_key, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if job_id is not None: + _path_params["job_id"] = job_id + # process the query parameters + if pod_name is not None: + + _query_params.append(("pod_name", pod_name)) + + if cluster is not None: + + _query_params.append(("cluster", cluster)) + + if prev_key is not None: + + _query_params.append(("prev_key", prev_key)) + + if next_key is not None: + + _query_params.append(("next_key", next_key)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/fine-tuning/jobs/{job_id}/logs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call async def jobs_cancel( self, diff --git a/saturn_api/api/inference_endpoints_api.py b/saturn_api/api/inference_endpoints_api.py new file mode 100644 index 0000000..ca3e96b --- /dev/null +++ b/saturn_api/api/inference_endpoints_api.py @@ -0,0 +1,1901 @@ +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Dict, List, Optional, Tuple, Union + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated + +from saturn_api.api_client import ApiClient, RequestSerialized +from saturn_api.api_response import ApiResponse +from saturn_api.models.historic_log_list import HistoricLogList +from saturn_api.models.inference_endpoint_create import InferenceEndpointCreate +from saturn_api.models.inference_endpoint_list import InferenceEndpointList +from saturn_api.models.inference_endpoint_view import InferenceEndpointView +from saturn_api.rest import RESTResponseType + + +class InferenceEndpointsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + async def create( + self, + org_id: StrictStr, + inference_endpoint_create: InferenceEndpointCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InferenceEndpointView: + """Create inference endpoint + + Create a new inference endpoint. + + :param org_id: (required) + :type org_id: str + :param inference_endpoint_create: (required) + :type inference_endpoint_create: InferenceEndpointCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + inference_endpoint_create=inference_endpoint_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def create_with_http_info( + self, + org_id: StrictStr, + inference_endpoint_create: InferenceEndpointCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InferenceEndpointView]: + """Create inference endpoint + + Create a new inference endpoint. + + :param org_id: (required) + :type org_id: str + :param inference_endpoint_create: (required) + :type inference_endpoint_create: InferenceEndpointCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + inference_endpoint_create=inference_endpoint_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def create_without_preload_content( + self, + org_id: StrictStr, + inference_endpoint_create: InferenceEndpointCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create inference endpoint + + Create a new inference endpoint. + + :param org_id: (required) + :type org_id: str + :param inference_endpoint_create: (required) + :type inference_endpoint_create: InferenceEndpointCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + org_id=org_id, + inference_endpoint_create=inference_endpoint_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_serialize( + self, + org_id, + inference_endpoint_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if inference_endpoint_create is not None: + _body_params = inference_endpoint_create + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def delete( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete inference endpoint + + Delete an inference endpoint. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def delete_with_http_info( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete inference endpoint + + Delete an inference endpoint. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def delete_without_preload_content( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete inference endpoint + + Delete an inference endpoint. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_serialize( + self, + org_id, + endpoint_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if endpoint_id is not None: + _path_params["endpoint_id"] = endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def endpoints_start( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InferenceEndpointView: + """Start inference endpoint + + Bring up the underlying persistent deployment. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._endpoints_start_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def endpoints_start_with_http_info( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InferenceEndpointView]: + """Start inference endpoint + + Bring up the underlying persistent deployment. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._endpoints_start_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def endpoints_start_without_preload_content( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start inference endpoint + + Bring up the underlying persistent deployment. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._endpoints_start_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _endpoints_start_serialize( + self, + org_id, + endpoint_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if endpoint_id is not None: + _path_params["endpoint_id"] = endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/start", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def endpoints_stop( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InferenceEndpointView: + """Stop inference endpoint + + Tear down the pod but keep the DB row. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._endpoints_stop_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def endpoints_stop_with_http_info( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InferenceEndpointView]: + """Stop inference endpoint + + Tear down the pod but keep the DB row. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._endpoints_stop_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def endpoints_stop_without_preload_content( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop inference endpoint + + Tear down the pod but keep the DB row. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._endpoints_stop_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _endpoints_stop_serialize( + self, + org_id, + endpoint_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if endpoint_id is not None: + _path_params["endpoint_id"] = endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/stop", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def get( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InferenceEndpointView: + """Get inference endpoint + + Get an inference endpoint. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def get_with_http_info( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InferenceEndpointView]: + """Get inference endpoint + + Get an inference endpoint. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def get_without_preload_content( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get inference endpoint + + Get an inference endpoint. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointView", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_serialize( + self, + org_id, + endpoint_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if endpoint_id is not None: + _path_params["endpoint_id"] = endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def get_logs( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HistoricLogList: + """Get inference endpoint historical logs + + Historical record of logs from the resource. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param pod_name: Name of the pod to retrieve logs from. + :type pod_name: str + :param cluster: Name of the cluster the pod lives in. + :type cluster: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Maximum number of results per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_logs_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + pod_name=pod_name, + cluster=cluster, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "HistoricLogList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def get_logs_with_http_info( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HistoricLogList]: + """Get inference endpoint historical logs + + Historical record of logs from the resource. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param pod_name: Name of the pod to retrieve logs from. + :type pod_name: str + :param cluster: Name of the cluster the pod lives in. + :type cluster: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Maximum number of results per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_logs_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + pod_name=pod_name, + cluster=cluster, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "HistoricLogList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def get_logs_without_preload_content( + self, + org_id: StrictStr, + endpoint_id: StrictStr, + pod_name: Annotated[ + Optional[StrictStr], Field(description="Name of the pod to retrieve logs from.") + ] = None, + cluster: Annotated[ + Optional[StrictStr], Field(description="Name of the cluster the pod lives in.") + ] = None, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Maximum number of results per page."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get inference endpoint historical logs + + Historical record of logs from the resource. + + :param org_id: (required) + :type org_id: str + :param endpoint_id: (required) + :type endpoint_id: str + :param pod_name: Name of the pod to retrieve logs from. + :type pod_name: str + :param cluster: Name of the cluster the pod lives in. + :type cluster: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Maximum number of results per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_logs_serialize( + org_id=org_id, + endpoint_id=endpoint_id, + pod_name=pod_name, + cluster=cluster, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "HistoricLogList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_logs_serialize( + self, + org_id, + endpoint_id, + pod_name, + cluster, + prev_key, + next_key, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + if endpoint_id is not None: + _path_params["endpoint_id"] = endpoint_id + # process the query parameters + if pod_name is not None: + + _query_params.append(("pod_name", pod_name)) + + if cluster is not None: + + _query_params.append(("cluster", cluster)) + + if prev_key is not None: + + _query_params.append(("prev_key", prev_key)) + + if next_key is not None: + + _query_params.append(("next_key", next_key)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints/{endpoint_id}/logs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + async def list( + self, + org_id: StrictStr, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InferenceEndpointList: + """List inference endpoints + + Paginated list of inference endpoints. + + :param org_id: (required) + :type org_id: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def list_with_http_info( + self, + org_id: StrictStr, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InferenceEndpointList]: + """List inference endpoints + + Paginated list of inference endpoints. + + :param org_id: (required) + :type org_id: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def list_without_preload_content( + self, + org_id: StrictStr, + prev_key: Annotated[Optional[StrictStr], Field(description="Previous page key.")] = None, + next_key: Annotated[Optional[StrictStr], Field(description="Next page key.")] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], + Field(description="Page size."), + ] = None, + descending: Annotated[ + Optional[StrictBool], Field(description="List results in descending order.") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List inference endpoints + + Paginated list of inference endpoints. + + :param org_id: (required) + :type org_id: str + :param prev_key: Previous page key. + :type prev_key: str + :param next_key: Next page key. + :type next_key: str + :param page_size: Page size. + :type page_size: int + :param descending: List results in descending order. + :type descending: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_serialize( + org_id=org_id, + prev_key=prev_key, + next_key=next_key, + page_size=page_size, + descending=descending, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "InferenceEndpointList", + } + response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_serialize( + self, + org_id, + prev_key, + next_key, + page_size, + descending, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params["org_id"] = org_id + # process the query parameters + if prev_key is not None: + + _query_params.append(("prev_key", prev_key)) + + if next_key is not None: + + _query_params.append(("next_key", next_key)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + if descending is not None: + + _query_params.append(("descending", descending)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = ["bearerAuth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/orgs/{org_id}/token-factory/inference-endpoints", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/saturn_api/models/__init__.py b/saturn_api/models/__init__.py index b4deffa..84721bc 100644 --- a/saturn_api/models/__init__.py +++ b/saturn_api/models/__init__.py @@ -71,7 +71,9 @@ from saturn_api.models.data_point import DataPoint from saturn_api.models.dataset import Dataset from saturn_api.models.dataset_create import DatasetCreate +from saturn_api.models.dataset_import_create import DatasetImportCreate from saturn_api.models.dataset_list import DatasetList +from saturn_api.models.dataset_lock_create import DatasetLockCreate from saturn_api.models.default_images import DefaultImages from saturn_api.models.default_sizes import DefaultSizes from saturn_api.models.deployment import Deployment @@ -85,6 +87,7 @@ from saturn_api.models.deployment_start import DeploymentStart from saturn_api.models.deployment_status import DeploymentStatus from saturn_api.models.deployment_update import DeploymentUpdate +from saturn_api.models.disk_space_option import DiskSpaceOption from saturn_api.models.external_repo import ExternalRepo from saturn_api.models.external_repo_attachment import ExternalRepoAttachment from saturn_api.models.external_repo_attachment_create import ( @@ -110,6 +113,7 @@ from saturn_api.models.extra_packages_recipe_pip import ExtraPackagesRecipePip from saturn_api.models.fine_tune_job_create import FineTuneJobCreate from saturn_api.models.fine_tune_job_list import FineTuneJobList +from saturn_api.models.fine_tune_job_summary import FineTuneJobSummary from saturn_api.models.fine_tune_job_view import FineTuneJobView from saturn_api.models.group import Group from saturn_api.models.group_create import GroupCreate @@ -149,6 +153,10 @@ from saturn_api.models.image_tag_state import ImageTagState from saturn_api.models.image_tag_update import ImageTagUpdate from saturn_api.models.image_update import ImageUpdate +from saturn_api.models.inference_endpoint_create import InferenceEndpointCreate +from saturn_api.models.inference_endpoint_list import InferenceEndpointList +from saturn_api.models.inference_endpoint_summary import InferenceEndpointSummary +from saturn_api.models.inference_endpoint_view import InferenceEndpointView from saturn_api.models.instance_size import InstanceSize from saturn_api.models.invitation import Invitation from saturn_api.models.invitation_create import InvitationCreate diff --git a/saturn_api/models/app_info.py b/saturn_api/models/app_info.py index 57dda3c..03e9ed8 100644 --- a/saturn_api/models/app_info.py +++ b/saturn_api/models/app_info.py @@ -53,6 +53,9 @@ class AppInfo(BaseModel): description="Root domain for deployment and workspace URLs." ) dind_enabled: StrictBool = Field(description="True if docker-in-docker is enabled.") + token_factory_enabled_global: StrictBool = Field( + description="Install-wide Token Factory switch (the global Settings flag). Per-org enablement is narrowed client-side against the active owner's usage-limit flag." + ) apply_requires_confirm: StrictBool = Field( description="True if recipe apply should be confirmed." ) @@ -79,6 +82,7 @@ class AppInfo(BaseModel): "git_repo_clone_dir", "app_serving_domain", "dind_enabled", + "token_factory_enabled_global", "apply_requires_confirm", "hide_invitations", "populate_examples", @@ -163,6 +167,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "git_repo_clone_dir": obj.get("git_repo_clone_dir"), "app_serving_domain": obj.get("app_serving_domain"), "dind_enabled": obj.get("dind_enabled"), + "token_factory_enabled_global": obj.get("token_factory_enabled_global"), "apply_requires_confirm": obj.get("apply_requires_confirm"), "hide_invitations": obj.get("hide_invitations"), "populate_examples": obj.get("populate_examples"), diff --git a/saturn_api/models/dataset_import_create.py b/saturn_api/models/dataset_import_create.py new file mode 100644 index 0000000..aa2c350 --- /dev/null +++ b/saturn_api/models/dataset_import_create.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Annotated, Self + + +class DatasetImportCreate(BaseModel): + """ + DatasetImportCreate + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Human-readable name for the dataset." + ) + hf_dataset_id: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Hugging Face dataset identifier, e.g. ``databricks/databricks-dolly-15k``." + ) + split: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( + default="train", description="Hugging Face split to import (default: ``train``)." + ) + config_name: Optional[StrictStr] = Field( + default=None, description="Optional Hugging Face config/subset name." + ) + __properties: ClassVar[List[str]] = ["name", "hf_dataset_id", "split", "config_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatasetImportCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if config_name (nullable) is None + # and model_fields_set contains the field + if self.config_name is None and "config_name" in self.model_fields_set: + _dict["config_name"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatasetImportCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "hf_dataset_id": obj.get("hf_dataset_id"), + "split": obj.get("split") if obj.get("split") is not None else "train", + "config_name": obj.get("config_name"), + } + ) + return _obj diff --git a/saturn_api/models/dataset_lock_create.py b/saturn_api/models/dataset_lock_create.py new file mode 100644 index 0000000..10280ed --- /dev/null +++ b/saturn_api/models/dataset_lock_create.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Annotated, Self + + +class DatasetLockCreate(BaseModel): + """ + DatasetLockCreate + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Human-readable name for the dataset." + ) + shared_folder_id: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="ID of the existing SharedFolder to lock and register as a dataset." + ) + subpath: Optional[StrictStr] = Field( + default=None, + description="Optional subpath within the folder where the dataset bytes live (e.g. ``data.jsonl`` or ``subdir/``). Defaults to the folder root.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, description="Optional metadata blob (schema_type, row_count, etc.)." + ) + __properties: ClassVar[List[str]] = ["name", "shared_folder_id", "subpath", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatasetLockCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if subpath (nullable) is None + # and model_fields_set contains the field + if self.subpath is None and "subpath" in self.model_fields_set: + _dict["subpath"] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatasetLockCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "shared_folder_id": obj.get("shared_folder_id"), + "subpath": obj.get("subpath"), + "metadata": obj.get("metadata"), + } + ) + return _obj diff --git a/saturn_api/models/disk_space_option.py b/saturn_api/models/disk_space_option.py new file mode 100644 index 0000000..8f35b41 --- /dev/null +++ b/saturn_api/models/disk_space_option.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class DiskSpaceOption(BaseModel): + """ + DiskSpaceOption + """ # noqa: E501 + + value: StrictStr = Field( + description="Kubernetes-style disk size (e.g. '100Gi') submitted when creating a resource." + ) + display_str: StrictStr = Field(description="Human-readable label shown in the picker.") + __properties: ClassVar[List[str]] = ["value", "display_str"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DiskSpaceOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "value", + "display_str", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DiskSpaceOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "display_str": obj.get("display_str")} + ) + return _obj diff --git a/saturn_api/models/fine_tune_job_create.py b/saturn_api/models/fine_tune_job_create.py index bd13d05..17a5cec 100644 --- a/saturn_api/models/fine_tune_job_create.py +++ b/saturn_api/models/fine_tune_job_create.py @@ -32,9 +32,6 @@ class FineTuneJobCreate(BaseModel): name: Annotated[str, Field(min_length=1, strict=True)] = Field( description="Human-readable name for the fine-tuning job." ) - base_model: Annotated[str, Field(min_length=1, strict=True)] = Field( - description="Base model to fine-tune. Must be one of the platform's supported models (see SUPPORTED_MODELS allow-list)." - ) dataset_id: Annotated[str, Field(min_length=1, strict=True)] = Field( description="Identifier of a token-factory dataset artifact. The dataset must have status=READY and belong to the same org as the requester." ) @@ -42,12 +39,23 @@ class FineTuneJobCreate(BaseModel): instance_size: Annotated[str, Field(min_length=1, strict=True)] = Field( description="Saturn instance size to run the training pod on. Must be a GPU-equipped size (gpu > 0)." ) + base_model: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( + default=None, + description="Base model to fine-tune a fresh adapter from. Must be one of the platform's supported models (see SUPPORTED_MODELS allow-list). Provide EITHER this OR ``source_checkpoint_artifact_id`` (exactly one). Omit when continuing from a checkpoint — the base_model is then derived from the checkpoint's metadata.", + ) + source_checkpoint_artifact_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = ( + Field( + default=None, + description="Artifact id of an existing checkpoint to continue-train. Must be a ``kind=checkpoint`` Artifact with ``status=ready`` belonging to the same org as the requester. When set, training continues the SAME LoRA adapter on the new dataset (weight-init continuation), and ``base_model`` is derived from the checkpoint's metadata. Provide EITHER this OR ``base_model`` (exactly one).", + ) + ) __properties: ClassVar[List[str]] = [ "name", - "base_model", "dataset_id", "hyperparameters", "instance_size", + "base_model", + "source_checkpoint_artifact_id", ] model_config = ConfigDict( @@ -90,6 +98,19 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of hyperparameters if self.hyperparameters: _dict["hyperparameters"] = self.hyperparameters.to_dict() + # set to None if base_model (nullable) is None + # and model_fields_set contains the field + if self.base_model is None and "base_model" in self.model_fields_set: + _dict["base_model"] = None + + # set to None if source_checkpoint_artifact_id (nullable) is None + # and model_fields_set contains the field + if ( + self.source_checkpoint_artifact_id is None + and "source_checkpoint_artifact_id" in self.model_fields_set + ): + _dict["source_checkpoint_artifact_id"] = None + return _dict @classmethod @@ -104,7 +125,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "name": obj.get("name"), - "base_model": obj.get("base_model"), "dataset_id": obj.get("dataset_id"), "hyperparameters": ( Hyperparameters1.from_dict(obj["hyperparameters"]) @@ -112,6 +132,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: else None ), "instance_size": obj.get("instance_size"), + "base_model": obj.get("base_model"), + "source_checkpoint_artifact_id": obj.get("source_checkpoint_artifact_id"), } ) return _obj diff --git a/saturn_api/models/fine_tune_job_list.py b/saturn_api/models/fine_tune_job_list.py index f09072f..6fc8489 100644 --- a/saturn_api/models/fine_tune_job_list.py +++ b/saturn_api/models/fine_tune_job_list.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Self -from saturn_api.models.fine_tune_job_view import FineTuneJobView +from saturn_api.models.fine_tune_job_summary import FineTuneJobSummary class FineTuneJobList(BaseModel): @@ -29,8 +29,8 @@ class FineTuneJobList(BaseModel): FineTuneJobList """ # noqa: E501 - jobs: List[FineTuneJobView] = Field( - description="List of fine-tuning jobs (FineTuneJobView projections)." + jobs: List[FineTuneJobSummary] = Field( + description="List of fine-tuning jobs (``FineTuneJobSummary`` projections — without ``latest_checkpoint``; fetch the by-id endpoint for that)." ) prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") @@ -103,7 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "jobs": ( - [FineTuneJobView.from_dict(_item) for _item in obj["jobs"]] + [FineTuneJobSummary.from_dict(_item) for _item in obj["jobs"]] if obj.get("jobs") is not None else None ), diff --git a/saturn_api/models/fine_tune_job_summary.py b/saturn_api/models/fine_tune_job_summary.py new file mode 100644 index 0000000..3332549 --- /dev/null +++ b/saturn_api/models/fine_tune_job_summary.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.hyperparameters import Hyperparameters + + +class FineTuneJobSummary(BaseModel): + """ + FineTuneJobSummary + """ # noqa: E501 + + id: StrictStr = Field(description="Fine-tune job ID (same as the underlying deployment ID).") + name: StrictStr + status: StrictStr = Field( + description="Underlying Saturn job status: pending, running, stopping, stopped, completed, or error. Same vocabulary as the rest of the platform — TF intentionally does not translate to a product-specific set." + ) + created_at: StrictStr + started_at: Optional[StrictStr] + finished_at: Optional[StrictStr] + base_model: StrictStr + hyperparameters: Hyperparameters + __properties: ClassVar[List[str]] = [ + "id", + "name", + "status", + "created_at", + "started_at", + "finished_at", + "base_model", + "hyperparameters", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FineTuneJobSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "id", + "name", + "status", + "created_at", + "started_at", + "finished_at", + "base_model", + "hyperparameters", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hyperparameters + if self.hyperparameters: + _dict["hyperparameters"] = self.hyperparameters.to_dict() + # set to None if started_at (nullable) is None + # and model_fields_set contains the field + if self.started_at is None and "started_at" in self.model_fields_set: + _dict["started_at"] = None + + # set to None if finished_at (nullable) is None + # and model_fields_set contains the field + if self.finished_at is None and "finished_at" in self.model_fields_set: + _dict["finished_at"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FineTuneJobSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "base_model": obj.get("base_model"), + "hyperparameters": ( + Hyperparameters.from_dict(obj["hyperparameters"]) + if obj.get("hyperparameters") is not None + else None + ), + } + ) + return _obj diff --git a/saturn_api/models/fine_tune_job_view.py b/saturn_api/models/fine_tune_job_view.py index 17ec5d3..f6a1419 100644 --- a/saturn_api/models/fine_tune_job_view.py +++ b/saturn_api/models/fine_tune_job_view.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Self +from saturn_api.models.artifact import Artifact from saturn_api.models.hyperparameters import Hyperparameters @@ -41,10 +42,10 @@ class FineTuneJobView(BaseModel): hyperparameters: Hyperparameters dataset_id: StrictStr output_location: StrictStr = Field( - description="Structured location of the job's RW output folder: sf:/jobs//." + description="Structured location of the job's RW output folder: sf://." ) - checkpoint: Optional[Any] = Field( - description="Resolved checkpoint artifact (kind=checkpoint). Populated by the future checkpoint-registration PR; null until then." + latest_checkpoint: Optional[Artifact] = Field( + description="Most recently-registered usable (``status=ready``) checkpoint artifact (kind=checkpoint) whose ``producer.id`` matches this job's deployment id. Null if no ready checkpoint exists — the job may still be running, may have failed, or may have registered an error artifact (``status=error``) which is deliberately NOT surfaced here. To diagnose failures, read the job's training logs; the shim tees axolotl output to ``/training.log``. Named ``latest_checkpoint`` rather than ``checkpoint`` to leave room for future API surface exposing intermediate per-epoch checkpoints (axolotl writes ``checkpoint-N/`` subdirs to NFS during training, but those are not registered as separate Artifact rows today). Only returned by the single-GET endpoint; list responses use ``FineTuneJobSummary`` which omits this field." ) __properties: ClassVar[List[str]] = [ "id", @@ -57,7 +58,7 @@ class FineTuneJobView(BaseModel): "hyperparameters", "dataset_id", "output_location", - "checkpoint", + "latest_checkpoint", ] model_config = ConfigDict( @@ -113,7 +114,7 @@ def to_dict(self) -> Dict[str, Any]: "hyperparameters", "dataset_id", "output_location", - "checkpoint", + "latest_checkpoint", ] ) @@ -125,6 +126,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of hyperparameters if self.hyperparameters: _dict["hyperparameters"] = self.hyperparameters.to_dict() + # override the default output from pydantic by calling `to_dict()` of latest_checkpoint + if self.latest_checkpoint: + _dict["latest_checkpoint"] = self.latest_checkpoint.to_dict() # set to None if started_at (nullable) is None # and model_fields_set contains the field if self.started_at is None and "started_at" in self.model_fields_set: @@ -135,10 +139,10 @@ def to_dict(self) -> Dict[str, Any]: if self.finished_at is None and "finished_at" in self.model_fields_set: _dict["finished_at"] = None - # set to None if checkpoint (nullable) is None + # set to None if latest_checkpoint (nullable) is None # and model_fields_set contains the field - if self.checkpoint is None and "checkpoint" in self.model_fields_set: - _dict["checkpoint"] = None + if self.latest_checkpoint is None and "latest_checkpoint" in self.model_fields_set: + _dict["latest_checkpoint"] = None return _dict @@ -167,7 +171,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: ), "dataset_id": obj.get("dataset_id"), "output_location": obj.get("output_location"), - "checkpoint": obj.get("checkpoint"), + "latest_checkpoint": ( + Artifact.from_dict(obj["latest_checkpoint"]) + if obj.get("latest_checkpoint") is not None + else None + ), } ) return _obj diff --git a/saturn_api/models/inference_endpoint_create.py b/saturn_api/models/inference_endpoint_create.py new file mode 100644 index 0000000..b4fd3a5 --- /dev/null +++ b/saturn_api/models/inference_endpoint_create.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class InferenceEndpointCreate(BaseModel): + """ + InferenceEndpointCreate + """ # noqa: E501 + + name: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Human-readable name for the inference endpoint." + ) + checkpoint_artifact_id: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Artifact id of the checkpoint to serve. Must be a ``kind=checkpoint`` Artifact with ``status=ready`` belonging to the same org as the requester." + ) + instance_size: Annotated[str, Field(min_length=1, strict=True)] = Field( + description="Saturn instance size to run the inference pod on. Must be a GPU-equipped size (gpu > 0)." + ) + quantization: Literal["fp8", "int8"] | None = None + visibility: Literal["org", "owner"] = "org" + viewers: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field( + default=None, + description="Optional list of identity names (usernames or group names in the endpoint's org) granted access to the endpoint route in addition to the owner. Honored by ForwardAuth exactly like a normal deployment's viewers.", + ) + __properties: ClassVar[List[str]] = [ + "name", + "checkpoint_artifact_id", + "instance_size", + "quantization", + "visibility", + "viewers", + ] + + @field_validator("quantization") + def quantization_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["fp8", "int8"]): + raise ValueError("must be one of enum values ('fp8', 'int8')") + return value + + @field_validator("visibility") + def visibility_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["org", "owner"]): + raise ValueError("must be one of enum values ('org', 'owner')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InferenceEndpointCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if quantization (nullable) is None + # and model_fields_set contains the field + if self.quantization is None and "quantization" in self.model_fields_set: + _dict["quantization"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InferenceEndpointCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "checkpoint_artifact_id": obj.get("checkpoint_artifact_id"), + "instance_size": obj.get("instance_size"), + "quantization": obj.get("quantization"), + "visibility": obj.get("visibility") if obj.get("visibility") is not None else "org", + "viewers": obj.get("viewers"), + } + ) + return _obj diff --git a/saturn_api/models/inference_endpoint_list.py b/saturn_api/models/inference_endpoint_list.py new file mode 100644 index 0000000..909c4fd --- /dev/null +++ b/saturn_api/models/inference_endpoint_list.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.inference_endpoint_summary import InferenceEndpointSummary + + +class InferenceEndpointList(BaseModel): + """ + InferenceEndpointList + """ # noqa: E501 + + endpoints: List[InferenceEndpointSummary] = Field( + description="List of inference endpoints (``InferenceEndpointSummary`` projections — without ``checkpoint``; fetch the by-id endpoint for that)." + ) + prev_key: Optional[StrictStr] = Field(default=None, description="Previous page key.") + next_key: Optional[StrictStr] = Field(default=None, description="Next page key.") + __properties: ClassVar[List[str]] = ["endpoints", "prev_key", "next_key"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InferenceEndpointList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "endpoints", + "prev_key", + "next_key", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in endpoints (list) + _items = [] + if self.endpoints: + for _item_endpoints in self.endpoints: + if _item_endpoints: + _items.append(_item_endpoints.to_dict()) + _dict["endpoints"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InferenceEndpointList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "endpoints": ( + [InferenceEndpointSummary.from_dict(_item) for _item in obj["endpoints"]] + if obj.get("endpoints") is not None + else None + ), + "prev_key": obj.get("prev_key"), + "next_key": obj.get("next_key"), + } + ) + return _obj diff --git a/saturn_api/models/inference_endpoint_summary.py b/saturn_api/models/inference_endpoint_summary.py new file mode 100644 index 0000000..6745a8a --- /dev/null +++ b/saturn_api/models/inference_endpoint_summary.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class InferenceEndpointSummary(BaseModel): + """ + InferenceEndpointSummary + """ # noqa: E501 + + id: StrictStr = Field( + description="Inference endpoint ID (same as the underlying deployment ID)." + ) + name: StrictStr + status: StrictStr = Field( + description="Underlying Saturn deployment status: pending, running, stopping, stopped, or error." + ) + created_at: StrictStr + base_model: StrictStr = Field( + description="HuggingFace base model id derived from the checkpoint Artifact's ``metadata.base_model`` at create time." + ) + checkpoint_artifact_id: StrictStr = Field( + description="Artifact id of the checkpoint this endpoint is serving." + ) + instance_size: StrictStr + endpoint_url: StrictStr = Field( + description="Public URL clients POST OpenAI-compatible inference requests to. Uses the deployment's auto-generated subdomain. Returns the URL regardless of running state — clients can stash it; calls fail while the endpoint is stopped." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "status", + "created_at", + "base_model", + "checkpoint_artifact_id", + "instance_size", + "endpoint_url", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InferenceEndpointSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "id", + "name", + "status", + "created_at", + "base_model", + "checkpoint_artifact_id", + "instance_size", + "endpoint_url", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InferenceEndpointSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "base_model": obj.get("base_model"), + "checkpoint_artifact_id": obj.get("checkpoint_artifact_id"), + "instance_size": obj.get("instance_size"), + "endpoint_url": obj.get("endpoint_url"), + } + ) + return _obj diff --git a/saturn_api/models/inference_endpoint_view.py b/saturn_api/models/inference_endpoint_view.py new file mode 100644 index 0000000..7175432 --- /dev/null +++ b/saturn_api/models/inference_endpoint_view.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" +Saturn Cloud + +The API for Saturn Cloud. + +The version of the OpenAPI document: 2026.02.01 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from saturn_api.models.artifact import Artifact + + +class InferenceEndpointView(BaseModel): + """ + InferenceEndpointView + """ # noqa: E501 + + id: StrictStr = Field( + description="Inference endpoint ID (same as the underlying deployment ID)." + ) + name: StrictStr + status: StrictStr = Field( + description="Underlying Saturn deployment status: pending, running, stopping, stopped, or error." + ) + created_at: StrictStr + base_model: StrictStr = Field( + description="HuggingFace base model id derived from the checkpoint Artifact's ``metadata.base_model`` at create time." + ) + checkpoint_artifact_id: StrictStr = Field( + description="Artifact id of the checkpoint this endpoint is serving." + ) + instance_size: StrictStr + endpoint_url: StrictStr = Field( + description="Public URL clients POST OpenAI-compatible inference requests to. Uses the deployment's auto-generated subdomain. Returns the URL regardless of running state — clients can stash it; calls fail while the endpoint is stopped." + ) + checkpoint: Optional[Artifact] = Field( + description="Resolved checkpoint Artifact. Null only if the artifact was deleted out from under the endpoint (we block that path; the field is nullable defensively)." + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "status", + "created_at", + "base_model", + "checkpoint_artifact_id", + "instance_size", + "endpoint_url", + "checkpoint", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InferenceEndpointView from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "id", + "name", + "status", + "created_at", + "base_model", + "checkpoint_artifact_id", + "instance_size", + "endpoint_url", + "checkpoint", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of checkpoint + if self.checkpoint: + _dict["checkpoint"] = self.checkpoint.to_dict() + # set to None if checkpoint (nullable) is None + # and model_fields_set contains the field + if self.checkpoint is None and "checkpoint" in self.model_fields_set: + _dict["checkpoint"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InferenceEndpointView from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "base_model": obj.get("base_model"), + "checkpoint_artifact_id": obj.get("checkpoint_artifact_id"), + "instance_size": obj.get("instance_size"), + "endpoint_url": obj.get("endpoint_url"), + "checkpoint": ( + Artifact.from_dict(obj["checkpoint"]) + if obj.get("checkpoint") is not None + else None + ), + } + ) + return _obj diff --git a/saturn_api/models/server_options.py b/saturn_api/models/server_options.py index 1f90eff..3f301f7 100644 --- a/saturn_api/models/server_options.py +++ b/saturn_api/models/server_options.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Self +from saturn_api.models.disk_space_option import DiskSpaceOption from saturn_api.models.instance_size import InstanceSize @@ -32,7 +33,7 @@ class ServerOptions(BaseModel): auto_shutoff: List[StrictStr] = Field( description="List of available auto-shutoff settings for workspaces." ) - disk_space: List[StrictStr] = Field(description="List of available disk sizes for workspaces.") + disk_space: List[DiskSpaceOption] = Field(description="Available disk sizes for workspaces.") sizes: Dict[str, InstanceSize] = Field( description="Mapping of instance size names to their configurations." ) @@ -84,6 +85,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in disk_space (list) + _items = [] + if self.disk_space: + for _item_disk_space in self.disk_space: + if _item_disk_space: + _items.append(_item_disk_space.to_dict()) + _dict["disk_space"] = _items # override the default output from pydantic by calling `to_dict()` of each value in sizes (dict) _field_dict = {} if self.sizes: @@ -105,7 +113,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "auto_shutoff": obj.get("auto_shutoff"), - "disk_space": obj.get("disk_space"), + "disk_space": ( + [DiskSpaceOption.from_dict(_item) for _item in obj["disk_space"]] + if obj.get("disk_space") is not None + else None + ), "sizes": ( dict((_k, InstanceSize.from_dict(_v)) for _k, _v in obj["sizes"].items()) if obj.get("sizes") is not None diff --git a/saturn_api/models/usage_limits.py b/saturn_api/models/usage_limits.py index a7b3c22..1343516 100644 --- a/saturn_api/models/usage_limits.py +++ b/saturn_api/models/usage_limits.py @@ -39,6 +39,9 @@ class UsageLimits(BaseModel): resource_types: Optional[List[StrictStr]] = Field( description="Allowed resource types. Null if no limits." ) + token_factory_enabled: Optional[StrictBool] = Field( + description="Whether Token Factory is available under this limit. Null inherits the global setting; False hard-disables it." + ) num_instances: Optional[StrictInt] = Field( description="Maximum number of active instances. Null if no limits." ) @@ -70,6 +73,7 @@ class UsageLimits(BaseModel): "is_default", "instance_sizes", "resource_types", + "token_factory_enabled", "num_instances", "auto_shutoff", "storage_in_gb", @@ -126,6 +130,7 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set( [ @@ -136,6 +141,7 @@ def to_dict(self) -> Dict[str, Any]: "is_default", "instance_sizes", "resource_types", + "token_factory_enabled", "num_instances", "auto_shutoff", "storage_in_gb", @@ -163,6 +169,11 @@ def to_dict(self) -> Dict[str, Any]: if self.resource_types is None and "resource_types" in self.model_fields_set: _dict["resource_types"] = None + # set to None if token_factory_enabled (nullable) is None + # and model_fields_set contains the field + if self.token_factory_enabled is None and "token_factory_enabled" in self.model_fields_set: + _dict["token_factory_enabled"] = None + # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: @@ -228,6 +239,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_default": obj.get("is_default"), "instance_sizes": obj.get("instance_sizes"), "resource_types": obj.get("resource_types"), + "token_factory_enabled": obj.get("token_factory_enabled"), "num_instances": obj.get("num_instances"), "auto_shutoff": obj.get("auto_shutoff"), "storage_in_gb": obj.get("storage_in_gb"), diff --git a/saturn_api/models/usage_limits_create.py b/saturn_api/models/usage_limits_create.py index ecc2b31..b60da9c 100644 --- a/saturn_api/models/usage_limits_create.py +++ b/saturn_api/models/usage_limits_create.py @@ -40,6 +40,10 @@ class UsageLimitsCreate(BaseModel): resource_types: Optional[List[StrictStr]] = Field( default=None, description="Allowed resource types. Null if no limits." ) + token_factory_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether Token Factory is available under this limit. Null inherits the global setting; False hard-disables it.", + ) num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( default=None, description="Maximum number of active instances. Null if no limits." ) @@ -73,6 +77,7 @@ class UsageLimitsCreate(BaseModel): "is_default", "instance_sizes", "resource_types", + "token_factory_enabled", "num_instances", "auto_shutoff", "storage_in_gb", @@ -131,6 +136,11 @@ def to_dict(self) -> Dict[str, Any]: if self.resource_types is None and "resource_types" in self.model_fields_set: _dict["resource_types"] = None + # set to None if token_factory_enabled (nullable) is None + # and model_fields_set contains the field + if self.token_factory_enabled is None and "token_factory_enabled" in self.model_fields_set: + _dict["token_factory_enabled"] = None + # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: @@ -194,6 +204,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_default": obj.get("is_default") if obj.get("is_default") is not None else False, "instance_sizes": obj.get("instance_sizes"), "resource_types": obj.get("resource_types"), + "token_factory_enabled": obj.get("token_factory_enabled"), "num_instances": obj.get("num_instances"), "auto_shutoff": obj.get("auto_shutoff"), "storage_in_gb": obj.get("storage_in_gb"), diff --git a/saturn_api/models/usage_limits_update.py b/saturn_api/models/usage_limits_update.py index 8c04dd1..3dfbd83 100644 --- a/saturn_api/models/usage_limits_update.py +++ b/saturn_api/models/usage_limits_update.py @@ -37,6 +37,10 @@ class UsageLimitsUpdate(BaseModel): resource_types: Optional[List[StrictStr]] = Field( default=None, description="Allowed resource types. Null if no limits." ) + token_factory_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether Token Factory is available under this limit. Null inherits the global setting; False hard-disables it.", + ) num_instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( default=None, description="Maximum number of active instances. Null if no limits." ) @@ -69,6 +73,7 @@ class UsageLimitsUpdate(BaseModel): "is_default", "instance_sizes", "resource_types", + "token_factory_enabled", "num_instances", "auto_shutoff", "storage_in_gb", @@ -127,6 +132,11 @@ def to_dict(self) -> Dict[str, Any]: if self.resource_types is None and "resource_types" in self.model_fields_set: _dict["resource_types"] = None + # set to None if token_factory_enabled (nullable) is None + # and model_fields_set contains the field + if self.token_factory_enabled is None and "token_factory_enabled" in self.model_fields_set: + _dict["token_factory_enabled"] = None + # set to None if num_instances (nullable) is None # and model_fields_set contains the field if self.num_instances is None and "num_instances" in self.model_fields_set: @@ -189,6 +199,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_default": obj.get("is_default"), "instance_sizes": obj.get("instance_sizes"), "resource_types": obj.get("resource_types"), + "token_factory_enabled": obj.get("token_factory_enabled"), "num_instances": obj.get("num_instances"), "auto_shutoff": obj.get("auto_shutoff"), "storage_in_gb": obj.get("storage_in_gb"), diff --git a/saturn_api/models/workspace_server_options.py b/saturn_api/models/workspace_server_options.py index 45c6633..f3f74fe 100644 --- a/saturn_api/models/workspace_server_options.py +++ b/saturn_api/models/workspace_server_options.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Self +from saturn_api.models.disk_space_option import DiskSpaceOption from saturn_api.models.instance_size import InstanceSize @@ -30,7 +31,7 @@ class WorkspaceServerOptions(BaseModel): """ # noqa: E501 auto_shutoff: Literal["1 hour", "6 hours", "24 hours", "3 days", "7 days", "Never"] - disk_space: List[StrictStr] = Field(description="List of available disk space sizes.") + disk_space: List[DiskSpaceOption] = Field(description="Available disk space sizes.") size: List[InstanceSize] = Field(description="List of available instance sizes.") __properties: ClassVar[List[str]] = ["auto_shutoff", "disk_space", "size"] @@ -90,6 +91,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in disk_space (list) + _items = [] + if self.disk_space: + for _item_disk_space in self.disk_space: + if _item_disk_space: + _items.append(_item_disk_space.to_dict()) + _dict["disk_space"] = _items # override the default output from pydantic by calling `to_dict()` of each item in size (list) _items = [] if self.size: @@ -111,7 +119,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "auto_shutoff": obj.get("auto_shutoff"), - "disk_space": obj.get("disk_space"), + "disk_space": ( + [DiskSpaceOption.from_dict(_item) for _item in obj["disk_space"]] + if obj.get("disk_space") is not None + else None + ), "size": ( [InstanceSize.from_dict(_item) for _item in obj["size"]] if obj.get("size") is not None From 7c2dd9912ce84876ff67f8959c36d606f62fe5dc Mon Sep 17 00:00:00 2001 From: hugo Date: Tue, 2 Jun 2026 12:10:27 -0700 Subject: [PATCH 4/4] CI: pass python.yml when no tests collected (pytest exit 5) --- .github/workflows/python.yml | 7 +++++-- .openapi-generator-ignore | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6db7930..c356890 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,4 +1,5 @@ -# NOTE: This file is auto generated by OpenAPI Generator. +# NOTE: Originally generated by OpenAPI Generator, now hand-maintained. +# Listed in .openapi-generator-ignore so `make generate` won't clobber it. # URL: https://openapi-generator.tech # # ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python @@ -31,4 +32,6 @@ jobs: pip install -r test-requirements.txt - name: Test with pytest run: | - pytest --cov=saturn_api + # Exit code 5 = "no tests collected"; the generated client ships no + # tests, so treat that as success rather than a CI failure. + pytest --cov=saturn_api || [ $? -eq 5 ] diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 49bbcad..59e29c4 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -33,3 +33,6 @@ test/ git_push.sh .travis.yml .gitlab-ci.yml + +# Hand-maintained CI (pytest passes with no tests); don't let regen clobber it +.github/workflows/python.yml